Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Range("Reset Sheet!F13").Select Makes VBA Code Fail

I have a routine I am writing that causes the current sheet's visible
property to change to false and then takes the user to a Reset Sheet. Once
the person gets to the Reset Sheet, I want the routine to select cell F13 and
enter the phrase, "This sheet is hidden."

Well, I think I am stuck in R1C1 reference versus the other kind of
reference - whatever that is called.

My routine fails at this line.

Range("Reset Sheet!F13").Select

I have a feeling my VBA code wants me to use R1C1 type coding, but that
won't work because I don't know where the cursor will be when the user is
returned to the Reset Sheet.

Can you guys help me get this line to work using the specific cell reference?

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Range("Reset Sheet!F13").Select Makes VBA Code Fail


You have to select the sheet first, then select the range.
However you don't have to select either to enter a value in a range...
Worksheets("Reset Sheet").Range("F13").Value = "This sheet is hidden"
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"ToferKing"
wrote in message
I have a routine I am writing that causes the current sheet's visible
property to change to false and then takes the user to a Reset Sheet. Once
the person gets to the Reset Sheet, I want the routine to select cell F13 and
enter the phrase, "This sheet is hidden."

Well, I think I am stuck in R1C1 reference versus the other kind of
reference - whatever that is called.

My routine fails at this line.

Range("Reset Sheet!F13").Select

I have a feeling my VBA code wants me to use R1C1 type coding, but that
won't work because I don't know where the cursor will be when the user is
returned to the Reset Sheet.
Can you guys help me get this line to work using the specific cell reference?
Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Range("Reset Sheet!F13").Select Makes VBA Code Fail


one way
worksheets("Reset Sheet").range("f13").select

or

worksheets("Reset Sheet").range("f13").value = "This sheet is hidden."

--


Gary


"ToferKing" wrote in message
...
I have a routine I am writing that causes the current sheet's visible
property to change to false and then takes the user to a Reset Sheet. Once
the person gets to the Reset Sheet, I want the routine to select cell F13 and
enter the phrase, "This sheet is hidden."

Well, I think I am stuck in R1C1 reference versus the other kind of
reference - whatever that is called.

My routine fails at this line.

Range("Reset Sheet!F13").Select

I have a feeling my VBA code wants me to use R1C1 type coding, but that
won't work because I don't know where the cursor will be when the user is
returned to the Reset Sheet.

Can you guys help me get this line to work using the specific cell reference?

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Range("Reset Sheet!F13").Select Makes VBA Code Fail


Thanks Jim and Gary.
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
Result displays "FALSE" instead of "FAIL" Formula error Excel Discussion (Misc queries) 4 April 27th 09 11:07 AM
VBA code to "reset" application run and empty preserved arrays [email protected] Excel Programming 2 May 9th 07 11:40 AM
"Disk is Full" add-on question to "Can't reset last cell" post tod [email protected] Excel Discussion (Misc queries) 0 January 22nd 07 02:32 AM
Questionnaire sheet: Select "yes" or "no," and only one can be selected bpatterson Excel Worksheet Functions 2 April 13th 06 11:04 PM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM


All times are GMT +1. The time now is 12:39 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"