The Cymro Card
New Member
- Joined
- Dec 21, 2010
- Messages
- 1
I have a workbook / macro that no longer works since I moved to Excel 2007.
When running some code that hides / unhides rows it gives me
The offending line of code is
Now, I thought this may be due to the worksheet being protected; however I do have the code
before the offending line, and I can manually hide the rows in question if I go back to the Excel workbook. So it feels as though it's VBA not recognising the sheet is now unprotected
Additional potential complications
Although this happens when I run a macro, the line itself is in a change event within a worksheet.
The spreadsheet itself is created from a template file. The macro is called from an xla add-in.
As a slight aside, is there any one-stop location for seeing what doesn't translate well into 2007... other macros don't work either (but do on older versions of excel)
When running some code that hides / unhides rows it gives me
Runtime Error 1004 - unable to set the Hidden property of the range class.
The offending line of code is
Code:
Rows("35:40").Hidden = True
Now, I thought this may be due to the worksheet being protected; however I do have the code
Code:
ActiveSheet.Unprotect Password:=Range("Developer_Password").Value
before the offending line, and I can manually hide the rows in question if I go back to the Excel workbook. So it feels as though it's VBA not recognising the sheet is now unprotected
Additional potential complications
Although this happens when I run a macro, the line itself is in a change event within a worksheet.
The spreadsheet itself is created from a template file. The macro is called from an xla add-in.
As a slight aside, is there any one-stop location for seeing what doesn't translate well into 2007... other macros don't work either (but do on older versions of excel)