J
jfcby
Hello,
Why am I getting the Object required Error in the following macro
code?:
Sub HideWorkSheetsC()
Dim wbA As Workbook
Dim wbB As Workbook
Dim wsA As Worksheet
Dim wsB As Worksheet
Set wbA = Workbooks("Equip_List_FF.xls")
Set wbB = Workbooks("FF_ZoneBuildingEquipList.xls")
For Each wsA In wbA.Sheets
For Each cell In wbB.Worksheets("ZONE 5 - BLDG
LIST").Range("D468")
If Right(wsA.Range("C2"), 4).Value = cell Then GoTo nws 'Object
Required Error
If Right(wsA.Range("C2"), 4).Value <> cell Then GoTo hws 'Object
Required Error
Next cell
hws:
ws.Visible = xlSheetHidden 'xlSheetVisible
nws:
Next wsA
End Sub
Thenk you for your help,
jfcby
Why am I getting the Object required Error in the following macro
code?:
Sub HideWorkSheetsC()
Dim wbA As Workbook
Dim wbB As Workbook
Dim wsA As Worksheet
Dim wsB As Worksheet
Set wbA = Workbooks("Equip_List_FF.xls")
Set wbB = Workbooks("FF_ZoneBuildingEquipList.xls")
For Each wsA In wbA.Sheets
For Each cell In wbB.Worksheets("ZONE 5 - BLDG
LIST").Range("D468")
If Right(wsA.Range("C2"), 4).Value = cell Then GoTo nws 'Object
Required Error
If Right(wsA.Range("C2"), 4).Value <> cell Then GoTo hws 'Object
Required Error
Next cell
hws:
ws.Visible = xlSheetHidden 'xlSheetVisible
nws:
Next wsA
End Sub
Thenk you for your help,
jfcby