S
sue
HI all,
When I run this code it dies with a "Type Mismatch" error:
If
Worksheets(ThisWorkbook.CustomDocumentProperties.Item("System_1")).Visible
= xlSheetVisible Then
Worksheets(ThisWorkbook.CustomDocumentProperties.Item("System_1")).Name
= "System_1"
Worksheets(ThisWorkbook.CustomDocumentProperties.Item("System_1")).Visible
= xlSheetHidden
ThisWorkbook.CustomDocumentProperties.Item("System_1") = ""
End If
The odd thing is that the variable,
ThisWorkbook.CustomDocumentProperties.Item("System_1"),
is a string and is exactly the string needed to be placed within the
Worksheets()as a sheet index or name in the parenthesis. If I place a
string within the parens that is the same value as the custom property
it works fine...of course in that situation I do use quotes.
Thank in advance,
Susan
When I run this code it dies with a "Type Mismatch" error:
If
Worksheets(ThisWorkbook.CustomDocumentProperties.Item("System_1")).Visible
= xlSheetVisible Then
Worksheets(ThisWorkbook.CustomDocumentProperties.Item("System_1")).Name
= "System_1"
Worksheets(ThisWorkbook.CustomDocumentProperties.Item("System_1")).Visible
= xlSheetHidden
ThisWorkbook.CustomDocumentProperties.Item("System_1") = ""
End If
The odd thing is that the variable,
ThisWorkbook.CustomDocumentProperties.Item("System_1"),
is a string and is exactly the string needed to be placed within the
Worksheets()as a sheet index or name in the parenthesis. If I place a
string within the parens that is the same value as the custom property
it works fine...of course in that situation I do use quotes.
Thank in advance,
Susan