ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   userform error 1004 select method of range class failed (https://www.excelbanter.com/excel-programming/384691-userform-error-1004-select-method-range-class-failed.html)

mikeolson

userform error 1004 select method of range class failed
 
I get this error when I click this button. It always worked before I changed
the .visible class of inactive sheets to false 'xlsheetveryhidden. the only
visible sheet is the active sheet. This button is on Sheets("F"), I click
the button and it places a value in sheet MAIN and breaks on
formRowsource.show. I'm guessing it has to do with the inactive sheets being
hidden, but I can't figure it out. Please help.

Private Sub CommandButton1_Click()
ThisWorkbook.Unprotect
Sheets("MAIN").Range("AB5") = "L"
formRowsource.Show
End Sub

Thanks!
Mike


Alan[_2_]

userform error 1004 select method of range class failed
 
I replicated your code, using Sheets("Main") as a xlSheetVeryHidden
worksheet, and a Sheet("F") as the active visible worksheet. I did not
receive any errors writing to or extracting from the xlSheetVeryHidden
worksheet.

Regards,

Alan


"mikeolson" wrote in message
...
I get this error when I click this button. It always worked before I
changed
the .visible class of inactive sheets to false 'xlsheetveryhidden. the
only
visible sheet is the active sheet. This button is on Sheets("F"), I click
the button and it places a value in sheet MAIN and breaks on
formRowsource.show. I'm guessing it has to do with the inactive sheets
being
hidden, but I can't figure it out. Please help.

Private Sub CommandButton1_Click()
ThisWorkbook.Unprotect
Sheets("MAIN").Range("AB5") = "L"
formRowsource.Show
End Sub

Thanks!
Mike





All times are GMT +1. The time now is 06:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com