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: 133
Default Macro launch - Button vs Manual launch , has different results.

The following Macro behaves differently when manually started from the menu,
or when assigned to a Control button.
It does not work correctly when started from the button. It works OK from
the menu ( Tools;Macro;Macro <macro name Run)
The macro is supposed to create a adobe pdf file from a selected print
range. Using Excel 2000 , Adobe 6.0 Prof.
I have searched the trouble shooting section without sucess.
Can somebody help?

Sub Macro1()
Dim FILENAM
Sheets("Schedules").Select
ActiveSheet.PageSetup.PrintArea = "$A$230:$L$274"
Application.ActivePrinter = "Adobe PDF on Ne02:"
FILENAM = "C:\Test\mac1.pdf"
Application.SendKeys FILENAM, True
SendKeys "{Enter}"
SendKeys "Y"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Adobe PDF on Ne02:"
Application.Wait (Now + TimeValue("0:00:01"))
Sheets("Notes").Select
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
Auto Launch of Macro Daren Excel Discussion (Misc queries) 1 March 20th 07 08:10 PM
Is it possible to make a Button on a tool bar to launch an Add-in Wolf Excel Discussion (Misc queries) 1 June 24th 05 12:13 AM
button to launch my userform JasonSelf[_6_] Excel Programming 2 January 26th 04 04:11 PM
Can you use an IF statement to launch a macro? ian123[_34_] Excel Programming 3 January 3rd 04 12:38 AM
Can I launch the Calendar Control from a Comand Button kathryn Excel Programming 2 November 12th 03 04:25 PM


All times are GMT +1. The time now is 10:40 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"