ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Initializing UserForm (https://www.excelbanter.com/excel-programming/375687-initializing-userform.html)

CMcK

Initializing UserForm
 
'Hi,
I am working on a userform which references several cells on a worksheet
(called "Projects"). However, when I try toinitialise it from another
worksheet ("Timesheet") I get the following error message:

Run-time error 1004:
Select methos of Range class failed

Couls someone explain what this means please.

Ultimately, when the usrFrm has been completed I want to hide the "Projects"
worksheet and initailise the usrFrm from the "Timesheet" worksheet.

Many thanks.

CMcK



Tom Ogilvy

Initializing UserForm
 
You can't select on a hidden sheet - only on the activesheet.

You rarely need to select however

Userform1.Textbox1.Value = Worksheets("Projects").Range("B9").Value
Userform1.Textbox2.Value = Worksheets("Projects").Range("C11").Value

--
Regards,
Tom Ogilvy


"CMcK" wrote in message
...
'Hi,
I am working on a userform which references several cells on a worksheet
(called "Projects"). However, when I try toinitialise it from another
worksheet ("Timesheet") I get the following error message:

Run-time error 1004:
Select methos of Range class failed

Couls someone explain what this means please.

Ultimately, when the usrFrm has been completed I want to hide the
"Projects"
worksheet and initailise the usrFrm from the "Timesheet" worksheet.

Many thanks.

CMcK






All times are GMT +1. The time now is 06:30 AM.

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