![]() |
Why do I get an error in this code???
Why do I get an error in the third line of this little code:
Dim WS As Worksheet Dim WB As Workbook WB = ThisWorkbook For Each WS In WB.Worksheets ???? |
Why do I get an error in this code???
WB is an object, so use
Set WB = ThisWorkbook HTH, Bernie MS Excel MVP "Charlotte E." wrote in message ... Why do I get an error in the third line of this little code: Dim WS As Worksheet Dim WB As Workbook WB = ThisWorkbook For Each WS In WB.Worksheets ???? |
Why do I get an error in this code???
workbook is an object so use this:
Set WB = ThisWorkbook -- Gary "Charlotte E." wrote in message ... Why do I get an error in the third line of this little code: Dim WS As Worksheet Dim WB As Workbook WB = ThisWorkbook For Each WS In WB.Worksheets ???? |
Why do I get an error in this code???
Thanks to both Bernie and Gary :-)
"Gary Keramidas" <GKeramidasATmsn.com skrev i en meddelelse ... workbook is an object so use this: Set WB = ThisWorkbook -- Gary "Charlotte E." wrote in message ... Why do I get an error in the third line of this little code: Dim WS As Worksheet Dim WB As Workbook WB = ThisWorkbook For Each WS In WB.Worksheets ???? |
All times are GMT +1. The time now is 02:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com