View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
davegb davegb is offline
external usenet poster
 
Posts: 573
Default Won't accept sheet name


Dave Peterson wrote:
What's the sheet name?

Maybe:

sheets("County Records").Range("s4").value = "'" & ActiveSheet.Name

(to force it to be text. I added .value, 'cause I like it!)

davegb wrote:

I'm adding this line of code to save the current sheet name to

retrieve
later. When I enter it, I get an "Compile error, expected list
separator or )" error and it highlights the "s4". I have nearly the
exact same line of code elsewhere in the program and it works fine,
just has a different sheet and cell location.

sheets ("County Records).Range("s4")= ActiveSheet.Name

Any ideas why this is happening here? I'm just trying to save the
sheetname so I can put in a button/macro to return to the source

sheet
when I'm done with this one.
Thanks for the help.


--

Dave Peterson


Thanks for the reply, Dave.
I tried adding the ".value" after I posted here. Didn't help either!