Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Can I pass arguments to my formatted empty spreadsheet file?

Now that I have my macro running (to import a .CSV file) when I push the
button I added to the tool bar, I need a way to pass the file to be imported
into my formatted empty spreadsheet, and run the macro. Is this possible?
Can I pass arguments, maybe from a .BAT file, to eliminate the user from
being involved except to start some process, this being one of many steps to
run at night. Excel 2003 and 2007. I cannot find anything appropriate
about arguments in my very good Excel 2007 book by Walkenbach. TIA, Paul

  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Can I pass arguments to my formatted empty spreadsheet file?

Please search this group and read the thread :

subject: Schedule a macro on a specific time

"Paul H" wrote in message
...
Now that I have my macro running (to import a .CSV file) when I push the
button I added to the tool bar, I need a way to pass the file to be
imported into my formatted empty spreadsheet, and run the macro. Is this
possible? Can I pass arguments, maybe from a .BAT file, to eliminate the
user from being involved except to start some process, this being one of
many steps to run at night. Excel 2003 and 2007. I cannot find anything
appropriate about arguments in my very good Excel 2007 book by Walkenbach.
TIA, Paul


  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Can I pass arguments to my formatted empty spreadsheet file?


I searched Google and found the reference. It required me to know VB, which
I do not. I am hoping to find an example of a .Bat file or some similar
method to pass argument(s) and run a specific excel spreadsheet, using a
built-in macro, which I will have have recorded. I suppose I could rename
the current day's .CVS file to the name the macro has built-in, then rename
the resultant .XLS file to today's date as a subsequent step, so I'd just
need to start the spreadsheet as one of many steps in the night job.

"Patrick Molloy" wrote in message
...
Please search this group and read the thread :

subject: Schedule a macro on a specific time

"Paul H" wrote in message
...
Now that I have my macro running (to import a .CSV file) when I push the
button I added to the tool bar, I need a way to pass the file to be
imported into my formatted empty spreadsheet, and run the macro. Is this
possible? Can I pass arguments, maybe from a .BAT file, to eliminate the
user from being involved except to start some process, this being one of
many steps to run at night. Excel 2003 and 2007. I cannot find anything
appropriate about arguments in my very good Excel 2007 book by
Walkenbach. TIA, Paul



  #4   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Can I pass arguments to my formatted empty spreadsheet file?

if you use the workbook OPEN event to fire the macro, then you can use
Windows Task Manager to run the spreadsheet automatically

open the spreadsheet
go to the IDE (development environment) by pressing ALT+F11
go to the Project Explorer (Ctrl+R)
lookfor VBA(project(your workbook), then right click on ThisWorkbook and
select View Code
where you see (General) change to Workbook (its a dropdown)

you will see this:

Private Sub Workbook_Open()

End Sub

now add the name of your macro......

for example:
Private Sub Workbook_Open()
macro1
End Sub


whenever the workbook opens, the Open event fires and this in turns kicks
off your macro.

save the workbook

Open Task Manager on the PC that will run the spreadsheet .... setting up a
new task should be self explanatory. the program to run is NOT excel.exe but
it is the full name of your workbook


"Paul H" wrote in message
...

I searched Google and found the reference. It required me to know VB,
which I do not. I am hoping to find an example of a .Bat file or some
similar method to pass argument(s) and run a specific excel spreadsheet,
using a built-in macro, which I will have have recorded. I suppose I
could rename the current day's .CVS file to the name the macro has
built-in, then rename the resultant .XLS file to today's date as a
subsequent step, so I'd just need to start the spreadsheet as one of many
steps in the night job.

"Patrick Molloy" wrote in message
...
Please search this group and read the thread :

subject: Schedule a macro on a specific time

"Paul H" wrote in message
...
Now that I have my macro running (to import a .CSV file) when I push the
button I added to the tool bar, I need a way to pass the file to be
imported into my formatted empty spreadsheet, and run the macro. Is
this possible? Can I pass arguments, maybe from a .BAT file, to
eliminate the user from being involved except to start some process,
this being one of many steps to run at night. Excel 2003 and 2007. I
cannot find anything appropriate about arguments in my very good Excel
2007 book by Walkenbach. TIA, Paul



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
More on loading a CVS into an empty formatted XLS Paul H[_2_] Excel Discussion (Misc queries) 10 July 3rd 09 02:16 AM
Load a CSV into an empty, formatted XLS? Paul H[_2_] Excel Discussion (Misc queries) 15 June 29th 09 10:11 AM
How can I display symbols in phone # formatted cell when empty? Sandi Rutalnd Excel Worksheet Functions 1 January 21st 09 05:46 AM
Can I pass network logon name to a cell in a spreadsheet? Quality Plan Excel Worksheet Functions 5 December 4th 08 07:38 AM
How to calculate pass/fail percentages entered on a spreadsheet? Jenna New Users to Excel 2 August 5th 06 05:29 PM


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