View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Matthew Dodds Matthew Dodds is offline
external usenet poster
 
Posts: 26
Default Putting woirksheet name into a variable

On 17 Apr, 17:38, BZeyger wrote:
I have a form where a new sheet is created in a workbook. Everytime a sheet
is created it incraments up (sheet1, sheet2, sheet3, sheet4). I was tring to
put the active sheet name into a varable but I do not know the syntax.


Dim sWshName as string
sWshName=activeworkbook.worksheets(activeworkbook. worksheets.count).name

should do the job