PC Review


Reply
Thread Tools Rate Thread

Activate event

 
 
Lynn
Guest
Posts: n/a
 
      13th Sep 2003
I would like a macro to run ONLY ONCE when SheetX is
activated. I would then like cell A1 on SheetX to be
selected. How do I get this to work so that the macro does
not keep running again and again when cell A1 on SheetX is
selected?
 
Reply With Quote
 
 
 
 
Lynn
Guest
Posts: n/a
 
      13th Sep 2003
Private Sub Worksheet_Activate()
FdrExtract
Sheets("BOM & Price").Select
Range("A1").Select
End Sub

The problem occurs when sheet BOM & Price is
selected...the FdrExtract macro runs again and I end up in
an infinite loop.


>-----Original Message-----
>Post your macro here.
>"Lynn" <(E-Mail Removed)> wrote in message
>news:043e01c37a1a$b09db610$(E-Mail Removed)...
>> I would like a macro to run ONLY ONCE when SheetX is
>> activated. I would then like cell A1 on SheetX to be
>> selected. How do I get this to work so that the macro

does
>> not keep running again and again when cell A1 on SheetX

is
>> selected?

>
>
>.
>

 
Reply With Quote
 
Lynn
Guest
Posts: n/a
 
      13th Sep 2003
Thanks Tom!
>-----Original Message-----
>In the sheet module at the top:
>
>Dim bBlockcode as Boolean
>
>Private Sub Worksheet_Activate()
>if bBlockCode then exit sub
> Range("A1").Select
> bBlockCode = True
>End If
>End Sub
>
>--
>Regards,
>Tom Ogilvy
>
>
>Lynn <(E-Mail Removed)> wrote in message
>news:043e01c37a1a$b09db610$(E-Mail Removed)...
>> I would like a macro to run ONLY ONCE when SheetX is
>> activated. I would then like cell A1 on SheetX to be
>> selected. How do I get this to work so that the macro

does
>> not keep running again and again when cell A1 on SheetX

is
>> selected?

>
>
>.
>

 
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
FORM ACTIVATE EVENT Glint Microsoft Access Form Coding 3 10th Sep 2008 04:27 PM
on activate event =?Utf-8?B?Q2Fyb2wgU2h1?= Microsoft Access Database Table Design 1 25th Sep 2007 10:59 PM
On activate event =?Utf-8?B?U0hJUFA=?= Microsoft Excel Programming 5 30th Dec 2005 04:43 PM
activate event not fired ? ? =?Utf-8?B?anVzdHN0YXJ0ZXI=?= Microsoft VB .NET 5 5th Oct 2004 09:20 AM
activate event Cyrus Microsoft Dot NET Framework Forms 0 10th Dec 2003 02:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:04 PM.