Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I would like to start a macro which open another excelfile, by clicking a commandbutton. Thanks for your help KentÄ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
drag a commandbutton to the worksheet.
double click on it Private Sub Commandbutton1_click() Workbooks.Open "C:\Myfolder\MyFile.xls" End Sub return to Excel take the sheet out of design mode by clicking on the icon in the upper left corner of the Control Toolbox Toolbar (which should appear depressed since the sheet is in design mode) -- Regards, Tom Ogilvy "KentÄ" wrote in message ... Hi I would like to start a macro which open another excelfile, by clicking a commandbutton. Thanks for your help KentÄ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank's Tom
Sorry, but I want to run a macro (in Module StartUp) by clicking at the Command Button. The macro will open the file and execute futher commands. Thank's for help in advance Regards KentÄ "Tom Ogilvy" wrote: drag a commandbutton to the worksheet. double click on it Private Sub Commandbutton1_click() Workbooks.Open "C:\Myfolder\MyFile.xls" End Sub return to Excel take the sheet out of design mode by clicking on the icon in the upper left corner of the Control Toolbox Toolbar (which should appear depressed since the sheet is in design mode) -- Regards, Tom Ogilvy "KentÄ" wrote in message ... Hi I would like to start a macro which open another excelfile, by clicking a commandbutton. Thanks for your help KentÄ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Commandbutton1_click()
Startup.OpenBook End Sub in a module named Startup Sub OpenBook() Workbooks.Open "C:\Myfolder\MyFile.xls" End sub in the workbook that will be opend (MyFile.xls), use the Workbook_Open event See Chip Pearson's page on events http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "KentÄ" wrote in message ... Thank's Tom Sorry, but I want to run a macro (in Module StartUp) by clicking at the Command Button. The macro will open the file and execute futher commands. Thank's for help in advance Regards KentÄ "Tom Ogilvy" wrote: drag a commandbutton to the worksheet. double click on it Private Sub Commandbutton1_click() Workbooks.Open "C:\Myfolder\MyFile.xls" End Sub return to Excel take the sheet out of design mode by clicking on the icon in the upper left corner of the Control Toolbox Toolbar (which should appear depressed since the sheet is in design mode) -- Regards, Tom Ogilvy "KentÄ" wrote in message ... Hi I would like to start a macro which open another excelfile, by clicking a commandbutton. Thanks for your help KentÄ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank's Tom!
It works perfect Regards KentÄ "Tom Ogilvy" skrev: Private Sub Commandbutton1_click() Startup.OpenBook End Sub in a module named Startup Sub OpenBook() Workbooks.Open "C:\Myfolder\MyFile.xls" End sub in the workbook that will be opend (MyFile.xls), use the Workbook_Open event See Chip Pearson's page on events http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "KentÄ" wrote in message ... Thank's Tom Sorry, but I want to run a macro (in Module StartUp) by clicking at the Command Button. The macro will open the file and execute futher commands. Thank's for help in advance Regards KentÄ "Tom Ogilvy" wrote: drag a commandbutton to the worksheet. double click on it Private Sub Commandbutton1_click() Workbooks.Open "C:\Myfolder\MyFile.xls" End Sub return to Excel take the sheet out of design mode by clicking on the icon in the upper left corner of the Control Toolbox Toolbar (which should appear depressed since the sheet is in design mode) -- Regards, Tom Ogilvy "KentÄ" wrote in message ... Hi I would like to start a macro which open another excelfile, by clicking a commandbutton. Thanks for your help KentÄ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use Macro To Change Which Macro Assigned To Command Button | Excel Discussion (Misc queries) | |||
Button will not start macro | Excel Worksheet Functions | |||
Run Macro from Command Button | Excel Discussion (Misc queries) | |||
Start/Stop Macro Button | Excel Discussion (Misc queries) | |||
Can't start macro via button click | Excel Programming |