Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.scripting.vbscript,microsoft.public.dotnet.languages.vb,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
![]()
Il giorno Tue, 24 Jun 2008 14:15:04 -0700, ?B?TWlrZSBI?=
ha scritto: Sub sonic() for x=1 to worksheets.count worksheets(x).select 'do your stuff next end sub I'm not sure if this works with already opened worksheets. If it's not, you have to open every single xls before working on it. Set xl=CreateObject("excel.application") xl.Visible=True 'xl.Workbooks.Open Filename for x=1 to xl.worksheets.count xl.worksheets(x).select 'do your stuff next If you want to run an existing xls macro from a vbs: filePath = "c:\Test.xls" Set oExcel = CreateObject("Excel.Application") oExcel.Workbooks.Open(filepath) oExcel.Run "macro1" oExcel.ActiveWorkbook.Save oExcel.ActiveWorkbook.Close oExcel.Quit Set oExcel = Nothing -- Giovanni Cenati (Bergamo, Italy) Write to "Reventlov" at katamail com http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) -- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to generate a text file from Excel using a macro or script? | Excel Discussion (Misc queries) | |||
How to generate a text file from Excel using a macro or script? | Excel Discussion (Misc queries) | |||
can't save VBA script when saving excel file | Excel Discussion (Misc queries) | |||
Save Excel File every wednesday VB Script Help !! | Excel Discussion (Misc queries) | |||
Script to save Excel file to the server. | Excel Discussion (Misc queries) |