Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
My userform sources data from cells in a worksheet ("Projects"). However, when the other worksheet in my workbook ("Timesheet") is the active worksheet, the userform will not launch. Instead I get a run-time error: 'Select method of Range class failed' Can someone please explain why this occurs. Many thanks. CMcK |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you have code in the sheet module for Projects and it is of the form
Range("A1").Select if Projects is not the activesheet, this code will raise an error because it is implicitly qualified as worksheets("Projects").Range("A1").select and since projects is not the activesheet, you get the error. Change your code to ActiveSheet.Range("A1").Select possibly - it depends on what you are doing. -- Regards, Tom Ogilvy "CMcK" wrote: Hi, My userform sources data from cells in a worksheet ("Projects"). However, when the other worksheet in my workbook ("Timesheet") is the active worksheet, the userform will not launch. Instead I get a run-time error: 'Select method of Range class failed' Can someone please explain why this occurs. Many thanks. CMcK |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
I tried implementing the change you recommended and then running the userform from the 'Timesheet' worksheet and the following error came up: Run-time error 1004: Application-defined or object-defined error Any ideas?... CMcK "Tom Ogilvy" wrote: If you have code in the sheet module for Projects and it is of the form Range("A1").Select if Projects is not the activesheet, this code will raise an error because it is implicitly qualified as worksheets("Projects").Range("A1").select and since projects is not the activesheet, you get the error. Change your code to ActiveSheet.Range("A1").Select possibly - it depends on what you are doing. -- Regards, Tom Ogilvy "CMcK" wrote: Hi, My userform sources data from cells in a worksheet ("Projects"). However, when the other worksheet in my workbook ("Timesheet") is the active worksheet, the userform will not launch. Instead I get a run-time error: 'Select method of Range class failed' Can someone please explain why this occurs. Many thanks. CMcK |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Any ideas?...
That you have something screwed up in your code. Beyond that, I would have to be clairvoyant. If you used Activesheet.Range("A1").Select then I don't see how that would raise such an error unless Timesheet is a chart sheet or you have something unusual selected. (make sure timesheet is actually a worksheet and not a macro sheet or something). -- Regards, Tom Ogilvy "CMcK" wrote in message ... Hi Tom, I tried implementing the change you recommended and then running the userform from the 'Timesheet' worksheet and the following error came up: Run-time error 1004: Application-defined or object-defined error Any ideas?... CMcK "Tom Ogilvy" wrote: If you have code in the sheet module for Projects and it is of the form Range("A1").Select if Projects is not the activesheet, this code will raise an error because it is implicitly qualified as worksheets("Projects").Range("A1").select and since projects is not the activesheet, you get the error. Change your code to ActiveSheet.Range("A1").Select possibly - it depends on what you are doing. -- Regards, Tom Ogilvy "CMcK" wrote: Hi, My userform sources data from cells in a worksheet ("Projects"). However, when the other worksheet in my workbook ("Timesheet") is the active worksheet, the userform will not launch. Instead I get a run-time error: 'Select method of Range class failed' Can someone please explain why this occurs. Many thanks. CMcK |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Difficulty opening files with Excel | Excel Discussion (Misc queries) | |||
Out of Subscript error while opening a Userform | Excel Programming | |||
Userform opening | Excel Programming | |||
Opening Excel Application difficulty | Excel Discussion (Misc queries) | |||
Opening a UserForm | Excel Programming |