Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Msgbox result
Sub Print_All_Sections()
' ' Print_All_Sections Macro ' Macro recorded 05/07/2008 by Log-In ' ' Keyboard Shortcut: Ctrl+p MsgBox "This Will Print All Sections Sheets", vbYesNo If vbresponce = No Then Exit Sub Sheets(Array("Not Here", "transport", "forklift", "Carousel", "B & L", "C & D", _ "Managers", "Admin", "Tipping", "E", "F", "G", "H", "W W Irish")).Select Sheets("W W Irish").Activate ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Sheets("Control").Select ActiveWindow.SmallScroll Down:=-12 End Sub want the code to cancel printing if no is clicked but print all if yes is clicked but its not playing any ideas |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Msgbox result
Maybe...
Option Explicit Sub Print_All_Sections() dim Resp as long resp = MsgBox(prompt:="This Will Print All Sections Sheets", _ buttons:=vbYesNo) If resp = vbNo Then Exit Sub End if Sheets(Array("Not Here", "transport", "forklift", "Carousel", "B & L", _ "C & D", "Managers", "Admin", "Tipping", "E", "F", "G", _ "H", "W W Irish")).printout Copies:=1, Collate:=True End Sub Rich wrote: Sub Print_All_Sections() ' ' Print_All_Sections Macro ' Macro recorded 05/07/2008 by Log-In ' ' Keyboard Shortcut: Ctrl+p MsgBox "This Will Print All Sections Sheets", vbYesNo If vbresponce = No Then Exit Sub Sheets(Array("Not Here", "transport", "forklift", "Carousel", "B & L", "C & D", _ "Managers", "Admin", "Tipping", "E", "F", "G", "H", "W W Irish")).Select Sheets("W W Irish").Activate ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Sheets("Control").Select ActiveWindow.SmallScroll Down:=-12 End Sub want the code to cancel printing if no is clicked but print all if yes is clicked but its not playing any ideas -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need "if" with msgbox result | Excel Discussion (Misc queries) | |||
Macro - msgbox vs. enter result in a cell??/ | Excel Programming | |||
Advanced formula - Return result & Show Cell Reference of result | Excel Worksheet Functions | |||
Importing result from Access query to Excel but the result only c. | Excel Discussion (Misc queries) | |||
vlookup based on random result returns incorrect result | Excel Worksheet Functions |