Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range of Object Global failed
I am getting a runtime error '1004' Method 'Range' of object 'Global' failed Private Sub OptionButton2_Click() Sheets("Formulas").Visible = True Range("Formlas!B2") = "480" <----- Sheets("Formulas").Visible = False Sheets("Panel").Select End Sub when I originally wrote this code it worked, however now I get th run-time error. Does anyone know what would cause this and how I ge the active object to be the Worksheet? Thanks, Jaso -- JasonSel ----------------------------------------------------------------------- JasonSelf's Profile: http://www.excelforum.com/member.php...nfo&userid=533 View this thread: http://www.excelforum.com/showthread.php?threadid=48196 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range of Object Global failed
Range("Formlas!B2") = "480"
Looks as if you didn't spell the sheet name correctly. Btw, no need to make the sheet visible. -- Jim "JasonSelf" wrote in message ... | | I am getting a runtime error '1004' | Method 'Range' of object 'Global' failed | | Private Sub OptionButton2_Click() | Sheets("Formulas").Visible = True | Range("Formlas!B2") = "480" <----- | Sheets("Formulas").Visible = False | Sheets("Panel").Select | End Sub | | when I originally wrote this code it worked, however now I get the | run-time error. Does anyone know what would cause this and how I get | the active object to be the Worksheet? | | Thanks, | Jason | | | -- | JasonSelf | ------------------------------------------------------------------------ | JasonSelf's Profile: http://www.excelforum.com/member.php...fo&userid=5330 | View this thread: http://www.excelforum.com/showthread...hreadid=481967 | |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range of Object Global failed
Private Sub OptionButton2_Click()
with Sheets("Formulas") .Visible = True .Range("B2") = "480" <----- .Visible = False end with Sheets("Panel").Select End Sub -- HTH... Jim Thomlinson "JasonSelf" wrote: I am getting a runtime error '1004' Method 'Range' of object 'Global' failed Private Sub OptionButton2_Click() Sheets("Formulas").Visible = True Range("Formlas!B2") = "480" <----- Sheets("Formulas").Visible = False Sheets("Panel").Select End Sub when I originally wrote this code it worked, however now I get the run-time error. Does anyone know what would cause this and how I get the active object to be the Worksheet? Thanks, Jason -- JasonSelf ------------------------------------------------------------------------ JasonSelf's Profile: http://www.excelforum.com/member.php...fo&userid=5330 View this thread: http://www.excelforum.com/showthread...hreadid=481967 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range of Object Global failed
Thanks, The with method seems to have solved the problem...the spelling of formulas was a typo in the forum, however I wouldn't have been surprised if I had looked something that obvious over. -- JasonSelf ------------------------------------------------------------------------ JasonSelf's Profile: http://www.excelforum.com/member.php...fo&userid=5330 View this thread: http://www.excelforum.com/showthread...hreadid=481967 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
Range object global failure | Excel Programming | |||
Method Rows of Object Global Failed | Excel Programming | |||
Runime Error 1004 Method Range of Object Global Failed | Excel Programming | |||
Method Range of object global failed | Excel Programming |