View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
davegb[_2_] davegb[_2_] is offline
external usenet poster
 
Posts: 72
Default Variable not defined?

I just started writing some new code, went to test the first few
lines, but I'm getting a "variable not defined" error on the name of
my subroutine. Anybody know what's wrong with the name?

Sub WklySumWS() <------- VARIABLE NOT DEFINED

Dim wbWkly As Workbook
Dim wsWklyLst As Worksheet
Dim wsWklySum As Worksheet
Dim sWklyShtName As String


Set wsWklyLst = ActiveSheet
sWklyShtName = wsWklyLst.Name

Sheets.Add.Activate
wsWklySum = ActiveSheet
ActiveSheet.Name = sWklyShtName & " Summary"
End Sub

Thanks for the help!