Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is the code:
Private Sub CommandButton1_Click() Const PWORD As String = "dave" Dim wksSummary As Worksheet wksSummary.Unprotect password:=PWORD <---- OBJ VAR NOT SET Range("B:C").Select Selection.ClearContents Range("A1").Select End Sub This worked fine in a previous macro, but not today. Any ideas why it's not recognizing wksSummary or password? Or is it something else? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Object variable or withblock variable not set | Excel Programming | |||
Sum cells based on a row variable and seperate column variable | Excel Worksheet Functions | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
Run-time error '91': "Object variable or With block variable not set | Excel Programming | |||
Cells.Find error Object variable or With block variable not set | Excel Programming |