Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro assigned to print command button
i have assigned a macro to the print command, (filename is file1.) if i open
another excel spreadsheet (book1 or filename2,) the macro is still assigned to the print button. can the print button be reset to set the default command (print)after the macro has been executed? jat jaswal |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro assigned to print command button
If ActiveSheet.FileName = C:\MyDocuments\file1 Then
MyMacro ' Whatever your macro does Else Exit Sub End If "jatman" wrote: i have assigned a macro to the print command, (filename is file1.) if i open another excel spreadsheet (book1 or filename2,) the macro is still assigned to the print button. can the print button be reset to set the default command (print)after the macro has been executed? jat jaswal |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro assigned to print command button
If you want the active sheet to print, then change the Exit Sub to
ActiveSheet.PrintOut I'm wondering why you would tie another macro to the print button. Does it restrict the printing or specify a particular printer? "jatman" wrote: i have assigned a macro to the print command, (filename is file1.) if i open another excel spreadsheet (book1 or filename2,) the macro is still assigned to the print button. can the print button be reset to set the default command (print)after the macro has been executed? jat jaswal |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro assigned to print command button
it's used to restrict the printing. i want the macro to work from the print
button on a purchase order (instead of a big ugly command button in the middle of the screen.) by doing it like this, when they print the purchase order, it does everything (prints, saves, emails, rolls the count sequence on the po #.) i'll try this next week. thank you jatman "JLGWhiz" wrote: If you want the active sheet to print, then change the Exit Sub to ActiveSheet.PrintOut I'm wondering why you would tie another macro to the print button. Does it restrict the printing or specify a particular printer? "jatman" wrote: i have assigned a macro to the print command, (filename is file1.) if i open another excel spreadsheet (book1 or filename2,) the macro is still assigned to the print button. can the print button be reset to set the default command (print)after the macro has been executed? jat jaswal |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Command Button - Macro to print to pdf, then send pdf to email. | Excel Discussion (Misc queries) | |||
Use Macro To Change Which Macro Assigned To Command Button | Excel Discussion (Misc queries) | |||
Macro assigned to a button | Excel Discussion (Misc queries) | |||
Macro Assigned to a Button | Excel Discussion (Misc queries) | |||
How do I know what macro is assigned to a button? | Excel Discussion (Misc queries) |