Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run a macro always I open an Excel Document
Hi,
I need to run a macro always I open an Excel document, for exemple, a file with extensioo .csv. I found that if I aditioning to the Add-ins the file with the macro saved with the extensio .xla I have what I want. The code is write in the "Sub Workbook_Open()" to run since I open the file. But there's a problem. I have the code listed below... Private Sub Workbook_Open() Columns("A:M").Select ... ... End Sub I only write the first line because the problem starts here. When the code starts to run, the workboow isn't yet open and happens the error. If I stop the macro and run it again, the workbook is openned and all is right. How can I solve this problem? Thanks in adance. Rui |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run a macro always I open an Excel Document
try instead:
Range("A:M").Select HTH "Rui Álvares" wrote in message ... Hi, I need to run a macro always I open an Excel document, for exemple, a file with extensioo .csv. I found that if I aditioning to the Add-ins the file with the macro saved with the extensio .xla I have what I want. The code is write in the "Sub Workbook_Open()" to run since I open the file. But there's a problem. I have the code listed below... Private Sub Workbook_Open() Columns("A:M").Select ... ... End Sub I only write the first line because the problem starts here. When the code starts to run, the workboow isn't yet open and happens the error. If I stop the macro and run it again, the workbook is openned and all is right. How can I solve this problem? Thanks in adance. Rui |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using a macro to open another document | Excel Discussion (Misc queries) | |||
Using a macro to open another document | Excel Discussion (Misc queries) | |||
Macro to open specific document | Excel Discussion (Misc queries) | |||
Open a specific Word document from an Excel Macro | Excel Programming | |||
macro and button to open a word document from within excel | Excel Programming |