Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 95
Default Invalid outside procedure (creating a PDF button as a macro)

I found some steps to enable me to save a worksheet as a PDF but I am getting
the invalid outside procedure error from this line


Filename = "c:\Folder1\SubFolder1\" & ActiveSheet.Range("InvNbr").Value &
".pdf"

apparently this line "' This line of code specifies your directory as well
as the cell or range which you want the filename to come from. As you can
see, I have a specific cell with the range name "InvNbr" so that the macro
knows to pull the filename from there. If you don't want to use a range name,
just replace InvNbr with your cell reference, such as C4."

Any suggestions, really what I want to do is make the dir path generic to
always save to the persons desktop, but for now I want to test this to get it
working so I created a sample folder dir.

Any help would be great as I don't create Macros very much at all.



--
Neall
Reply
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
Run-time Error '5' - Invalid procedure call or argument Trefor Excel Discussion (Misc queries) 2 December 17th 07 03:32 AM
Creating a Macro Button to Extract Data william4444 New Users to Excel 2 July 4th 06 04:38 AM
Creating a macro that simulates some of the toolbar button Duangruthai New Users to Excel 1 April 22nd 06 12:12 AM
Run-time error '5': Invalid Procedure Call or Argument Nikila Excel Discussion (Misc queries) 2 February 24th 06 09:26 PM


All times are GMT +1. The time now is 06:57 PM.

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

About Us

"It's about Microsoft Excel"