View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Charlie Charlie is offline
external usenet poster
 
Posts: 703
Default Userforms, switching sheets

Ok, I named my worksheets, but when my code doesn't recognize the names once
I get out of the Private Sub UserForm_Initialize() code. Do I need to make
these name public? I don't understand everything I know about this
(obviously!)

....this is what I did:

Private Sub UserForm_Initialize()
Dim wsSchedules As Worksheet
Dim wsDates As Worksheet

Set wsSchedules = Worksheets("Sheet1")
Set wsDates = Worksheets("sheet2")


....and I can use

wsDates.Activate

and it's works, but once in a different sub() from another control it
doesn't recognize wsDates???