Reg: Macro - Auto run
Solved/Closed
Related:
- Reg: Macro - Auto run
- Hi5 reg - Guide
- Avast reg key - Hardware Forum
- Avast license key ✓ - Antivirus Forum
- Fl studio 21 reg key download - Download - Musical production
- Reg add hklm\software\policies\google\chrome /v browserguestmodeenabled /t reg_dword /d 0 - Guide
5 responses
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
2 Jan 2010 à 22:38
2 Jan 2010 à 22:38
I tried in my excel 2002 it works.
let us what could be the problem
go to some other sheet and then select sheet
does this help
If it does not
goto vbeditor (alt+F11)
then in the vbe editor click view and click immediate window
in the immedite window pate
application.enableevents=true
and hit enteer key at the end of the above line.
now again go someother sheet and again come back to sheet 1
The logic is whever you select sheet 1 the macro m will operate. by merely staying in sheet 1 it will not operate. keep this in mind. \\
confirm whether it is ok or still some problem.
let us what could be the problem
go to some other sheet and then select sheet
does this help
If it does not
goto vbeditor (alt+F11)
then in the vbe editor click view and click immediate window
in the immedite window pate
application.enableevents=true
and hit enteer key at the end of the above line.
now again go someother sheet and again come back to sheet 1
The logic is whever you select sheet 1 the macro m will operate. by merely staying in sheet 1 it will not operate. keep this in mind. \\
confirm whether it is ok or still some problem.
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
4 Jan 2010 à 19:47
4 Jan 2010 à 19:47
This is an event code. some event should happen. in this case it is activating a sheet. it can be double click or right click a cell or change in selection of a cell or change in the value of a cell which event do you want the fire the macro?????
the events are:
* Activate
* BeforeDoubleClick
* BeforeRightClick
* Calculate
* Change
* Deactivate
* SelectionChange
the events are:
* Activate
* BeforeDoubleClick
* BeforeRightClick
* Calculate
* Change
* Deactivate
* SelectionChange
aquarelle
Posts
7185
Registration date
Saturday 7 April 2007
Status
Moderator
Last seen
14 February 2026
491
5 Jan 2010 à 12:01
5 Jan 2010 à 12:01
Hello,
To automatically run a macro when you open a workbook, you have to add in a module of your workbook (with your example here) :
Best regards
To automatically run a macro when you open a workbook, you have to add in a module of your workbook (with your example here) :
Sub Auto_Open()
Activesheet.cells(5,5).value = 67
End Sub
Best regards
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
1 Jan 2010 à 04:56
1 Jan 2010 à 04:56
is it when you open the sheet or open the workbook
I assume when you activate a sheet.
right click the sheet tab and paste these two event codes
I assume when you activate a sheet.
right click the sheet tab and paste these two event codes
Private Sub Worksheet_Activate() macro name End Sub
Private Sub Worksheet_Deactivate() macro name End Sub
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
1 Jan 2010 à 08:14
1 Jan 2010 à 08:14
not clear where was the problem.. was the original macro in standard module
did you introduce the macro name in the space between the lines
Private Sub Worksheet_Activate()
and
end sub
what is your macro. post the macro
and the module number in which the macro is parked.
did you introduce the macro name in the space between the lines
Private Sub Worksheet_Activate()
and
end sub
what is your macro. post the macro
and the module number in which the macro is parked.
3 Jan 2010 à 23:24
ya its working once we select some other and return back to Sheet 1 ..
Thanks a lot venkat ..
its possible to run macro without doing this..