Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Start macro automatic

I want to know how to start a macro automatic. Not when I open Excel but when
I have an Excelfile open.
For example: If cell B3=1 then start macro "Start clock"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Start macro automatic

I suspect you're hinting towards something like:

'============================
Private Sub Worksheet_SelectionChange(ByVal target As Range)

If target.Address = "$B$1" And target.Value = 1 Then
StartClock
End If

End Sub
============================

This will have to be put in the code module behind the relevent
worksheet (and I think the macro StartClock will need to have its scope
extended to Public if it is in a standard module)

Hope this helps
J


BFSWE wrote:

I want to know how to start a macro automatic. Not when I open Excel but when
I have an Excelfile open.
For example: If cell B3=1 then start macro "Start clock"


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Start macro automatic

Hi WhytheQ.
Thank you for the answer. I will try it tomorrow.

"WhytheQ" skrev:

I suspect you're hinting towards something like:

'============================
Private Sub Worksheet_SelectionChange(ByVal target As Range)

If target.Address = "$B$1" And target.Value = 1 Then
StartClock
End If

End Sub
============================

This will have to be put in the code module behind the relevent
worksheet (and I think the macro StartClock will need to have its scope
extended to Public if it is in a standard module)

Hope this helps
J


BFSWE wrote:

I want to know how to start a macro automatic. Not when I open Excel but when
I have an Excelfile open.
For example: If cell B3=1 then start macro "Start clock"



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic start up with Excel? mms Excel Discussion (Misc queries) 3 September 18th 07 01:39 PM
Automatic start up with Excel? mms Excel Discussion (Misc queries) 0 September 15th 07 08:02 AM
How to using VBA to automatic start excel application? Roger Setting up and Configuration of Excel 1 May 16th 05 10:15 AM
Help? start macro automatic in excel pim_parra Excel Worksheet Functions 2 April 8th 05 02:03 PM
Automatic Macro Start Edgar[_3_] Excel Programming 1 November 10th 03 11:20 AM


All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"