LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Message Box with a twist...........

Hi all, I have spent all evening trying to figure this out but to no
avail so here goes:

I am trying to build a macro which will do the following.

If worksheets "Sheet4" and "Sheet5" are hidden it unhides them and
exits the sub.

However if BOTH of these worksheets are not hidden AND cell A1 in
sheet4 + cell A1 in sheet5 < 0
a message box is displayed prompting the user to respond yes or know.

On no the macro exits.

On yes sheets 4 & 5 are printed.


This is what I have so far.....

Any help would be greatly appreciated


__________________________________________________ ___________________________________________
' Macro3 Macro
' Macro recorded 14/03/2007 by elpep
' Keyboard Shortcut: Ctrl+r

If Sheets("Sheet4").Visible < xlSheetVisible Then
Sheets("Sheet4").Visible = True

MsgBox("There seem to be pricing errors - do you wish to continue",
[VbMsgBoxStyle=vbYesNo], [,EOD Reval])

If mbRes = vbNo Then
Exit Sub

Else
Sheets(Array("Sheet4", "Sheet4")).Select
Sheets("Sheet3").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If

End Sub
__________________________________________________ __________________________________________

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum with a Twist Q Seanie Excel Worksheet Functions 0 December 30th 08 02:29 PM
Sum with a Twist Q Seanie Excel Worksheet Functions 2 December 30th 08 01:11 PM
If but with a twist:( AVB Over My Head New Users to Excel 3 September 16th 08 04:43 AM
Sum with a twist andrew Excel Discussion (Misc queries) 15 June 18th 08 08:56 AM
Re-Name a Worksheet..... with a Twist John[_81_] Excel Programming 18 April 21st 04 07:27 AM


All times are GMT +1. The time now is 09:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"