Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / May 2006

Tip: Looking for answers? Try searching our database.

Check cell contents before print

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nobbyknownowt - 25 May 2006 15:58 GMT
Hello there

I have written a spreadsheet that requires certain information to be
entered in certain cells to acheive the desired result.
It will total as it goes along so that if a celll is left blank the
result though incorrect would still be printed.
I have a macro button on the sheet to print the sheet.
Is it possible for me to have this button check there is data in cells
C1(A date) G1 (text) K1 (list) C2 (text) G2 (text) K2 (text) O2 (list)
I11 (num) I13 (num) O8:O16 (num) and G51 (text)

Heres hoping

Cheers
Nobby

Signature

nobbyknownowt

Paul B - 26 May 2006 02:28 GMT
Nobby, you could use something like this,

Sub test()
Dim Cel As Range
For Each Cel In [C1:C2,G1:G2,K1:K2,O2, I11,I13,O8:O13,G51]
If IsEmpty(Cel) Then
Cel.Select
MsgBox "Data Missing", vbExclamation, "Can't Print Without All Data"
Exit Sub
End If
Next Cel

' ****Put your print code here*****

End Sub

Signature

Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

> Hello there
>
[quoted text clipped - 11 lines]
> Cheers
> Nobby
nobbyknownowt - 26 May 2006 11:11 GMT
Absolutely spot on.
Thanks matey!!

cheers
Nobby

Signature

nobbyknownowt

Paul B - 26 May 2006 23:48 GMT
Your welcome, thanks for the feedback

Signature

Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

> Absolutely spot on.
> Thanks matey!!
>
> cheers
> Nobby
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.