ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto macro (https://www.excelbanter.com/excel-programming/306346-auto-macro.html)

Alvin Hansen[_2_]

Auto macro
 
Please I i'm not good to this so..........

I have this
Private Sub Workbook_Open()
Run (GetData_Example1)


End Sub
Is a macro i will have running every time i open the workbook

But this is not the way so if some one will answer me then please do it so i
can understand it.
Thank you

Alvin


Frank Kabel

Auto macro
 
Hi
there have you put this macro? It has to go in your workbook module!

--
Regards
Frank Kabel
Frankfurt, Germany


Alvin Hansen wrote:
Please I i'm not good to this so..........

I have this
Private Sub Workbook_Open()
Run (GetData_Example1)


End Sub
Is a macro i will have running every time i open the workbook

But this is not the way so if some one will answer me then please do
it so i can understand it.
Thank you

Alvin


Ron de Bruin

Auto macro
 
Hi

See your other thread Alvin

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Alvin Hansen" wrote in message ...
Please I i'm not good to this so..........

I have this
Private Sub Workbook_Open()
Run (GetData_Example1)


End Sub
Is a macro i will have running every time i open the workbook

But this is not the way so if some one will answer me then please do it so i
can understand it.
Thank you

Alvin




Alvin Hansen[_2_]

Auto macro
 
It is in a module call
macroexamples

Alvin



"Frank Kabel" skrev:

Hi
there have you put this macro? It has to go in your workbook module!

--
Regards
Frank Kabel
Frankfurt, Germany


Alvin Hansen wrote:
Please I i'm not good to this so..........

I have this
Private Sub Workbook_Open()
Run (GetData_Example1)


End Sub
Is a macro i will have running every time i open the workbook

But this is not the way so if some one will answer me then please do
it so i can understand it.
Thank you

Alvin



Frank Kabel

Auto macro
 
Hi
and as Ron stated in your other thread it has to go in the workbook
module (called 'ThisWorkbook' in the VBA project bexplorer)

--
Regards
Frank Kabel
Frankfurt, Germany


Alvin Hansen wrote:
It is in a module call
macroexamples

Alvin



"Frank Kabel" skrev:

Hi
there have you put this macro? It has to go in your workbook module!

--
Regards
Frank Kabel
Frankfurt, Germany


Alvin Hansen wrote:
Please I i'm not good to this so..........

I have this
Private Sub Workbook_Open()
Run (GetData_Example1)


End Sub
Is a macro i will have running every time i open the workbook

But this is not the way so if some one will answer me then please

do
it so i can understand it.
Thank you

Alvin



Alvin Hansen[_2_]

Auto macro
 
Hi again
Please see he

This working:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
GetData_Example1
End Sub

This Working:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
GetData_Example1
End Sub

This not working:

Private Sub Workbook_Open()
GetData_Example1
End Sub

BEst regards alvin

"Ron de Bruin" skrev:

Hi

See your other thread Alvin

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Alvin Hansen" wrote in message ...
Please I i'm not good to this so..........

I have this
Private Sub Workbook_Open()
Run (GetData_Example1)


End Sub
Is a macro i will have running every time i open the workbook

But this is not the way so if some one will answer me then please do it so i
can understand it.
Thank you

Alvin





Alvin Hansen[_2_]

Auto macro
 
Hi
I know why it dosn't work
I open ecxel first and then i open the filw(workbook)
If i open the fil(worbook) whitout open excel first then is working

Thanks

Alvin


"Frank Kabel" skrev:

Hi
there have you put this macro? It has to go in your workbook module!

--
Regards
Frank Kabel
Frankfurt, Germany


Alvin Hansen wrote:
Please I i'm not good to this so..........

I have this
Private Sub Workbook_Open()
Run (GetData_Example1)


End Sub
Is a macro i will have running every time i open the workbook

But this is not the way so if some one will answer me then please do
it so i can understand it.
Thank you

Alvin




All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com