PC Review


Reply
Thread Tools Rate Thread

Automatic Activation of Macro when Tabbing into a cell

 
 
elisart
Guest
Posts: n/a
 
      3rd Oct 2008
I would like to create a form for our company that will cause a calendar
macro to automatically run when ever the appropriate cell(s) are activated by
tabbing or mouse click? I already have the calender macro. Just need to run
it when the cell activates. Any ideas?
 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      3rd Oct 2008
Put this macro in the worksheet code module of the sheet
with the magic cell on it.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("B5").Address Then
popUp
End If
End Sub

Put this macro in the standard Module1.


Sub popUp()
MsgBox "It works"
End Sub



When you select cell B5 the macro in the standard module will
run and display the message box. You can adapt this to suit
your needs.

"elisart" wrote:

> I would like to create a form for our company that will cause a calendar
> macro to automatically run when ever the appropriate cell(s) are activated by
> tabbing or mouse click? I already have the calender macro. Just need to run
> it when the cell activates. Any ideas?

 
Reply With Quote
 
elisart
Guest
Posts: n/a
 
      11th Oct 2008
Beautiful! Thanks.

"JLGWhiz" wrote:

> Put this macro in the worksheet code module of the sheet
> with the magic cell on it.
>
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> If Target.Address = Range("B5").Address Then
> popUp
> End If
> End Sub
>
> Put this macro in the standard Module1.
>
>
> Sub popUp()
> MsgBox "It works"
> End Sub
>
>
>
> When you select cell B5 the macro in the standard module will
> run and display the message box. You can adapt this to suit
> your needs.
>
> "elisart" wrote:
>
> > I would like to create a form for our company that will cause a calendar
> > macro to automatically run when ever the appropriate cell(s) are activated by
> > tabbing or mouse click? I already have the calender macro. Just need to run
> > it when the cell activates. Any ideas?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tabbing Issue after macro runs on selected cell brittm Microsoft Excel Programming 0 14th Dec 2009 10:19 PM
Re: automatic activation of a macro David M. Marcovitz Microsoft Powerpoint 2 28th Jul 2004 05:05 PM
Re: automatic activation of a macro Chirag Microsoft Powerpoint 0 28th Jul 2004 04:10 PM
Re: automatic activation of a macro Shyam Pillai Microsoft Powerpoint 1 28th Jul 2004 04:08 PM
Automatic activation of a macro or event. Craig Cerff Microsoft Access Macros 2 10th Jun 2004 12:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:29 AM.