Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Problem with ActiveSheet code

What can I do to get this code to work?


Private Sub UserForm_Initialize()

IF ActiveSheet range("E2").Value0 then OptionButton2.Visible = False

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Problem with ActiveSheet code

You need a dot between ActiveSheet and Range...

If ActiveSheet.Range("E2").Value 0 Then...

--
Rick (MVP - Excel)


"ordnance1" wrote in message
...
What can I do to get this code to work?


Private Sub UserForm_Initialize()

IF ActiveSheet range("E2").Value0 then OptionButton2.Visible = False

End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Problem with ActiveSheet code

Hi
You missed a dot:

ActiveSheet.range("E2").Value

regards
Paul
On Dec 24, 5:02*pm, "ordnance1" wrote:
What can I do to get this code to work?

Private Sub UserForm_Initialize()

IF ActiveSheet range("E2").Value0 then OptionButton2.Visible = False

End Sub


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Problem with ActiveSheet code

Thanks to both of you for the speedy response.

"Rick Rothstein" wrote in message
...
You need a dot between ActiveSheet and Range...

If ActiveSheet.Range("E2").Value 0 Then...

--
Rick (MVP - Excel)


"ordnance1" wrote in message
...
What can I do to get this code to work?


Private Sub UserForm_Initialize()

IF ActiveSheet range("E2").Value0 then OptionButton2.Visible = False

End Sub


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
Use a password in VBA ActiveSheet.protect & ActiveSheet.unprotect? Jim K. Excel Programming 2 June 2nd 08 08:09 PM
ActiveSheet.Pictures.Insert problem in excel 2007 Marvin Excel Programming 6 February 27th 08 05:36 AM
Copying new activesheet after other activesheet is hidden? Simon Lloyd[_790_] Excel Programming 1 June 20th 06 10:02 AM
ActiveSheet.PrintOut - problem Derek T. Excel Programming 3 February 23rd 04 07:36 PM
problem using ActiveSheet in VB sub Matt[_12_] Excel Programming 1 August 22nd 03 10:51 PM


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

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"