Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
select method of range class failed
Hi All, Ok, heres my prob. My code looks at a list of values(user names) i cells (231 in all) and checks for the existence of a filename dependin on each value(username). Then if the file exists it opens it and i supposed to select range(B2:G25), then it copies the selection activates the next window and selects the sheet associated with th value in the activecell in the original(username) sheet. Then it i supposed to paste the values in, close the sheet it copied from an carry on to the next one. The problem is the error Im getting abov when it opens the users sheet! Help would be much appreciated as can't see a real reason for the error. Its in Excel 97 on WinNT. Cheers Al -- Josep ----------------------------------------------------------------------- Joseph's Profile: http://www.excelforum.com/member.php...nfo&userid=563 View this thread: http://www.excelforum.com/showthread.php?threadid=26419 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
select method of range class failed
Generally the selection should be something like this:
worksheets("sheetname").Range("B2:G25").Select You may also refer to the sheet by number (from left to right starting at 1). the same command would look like this: worksheets(1).Range("B2:G25").Select assuming the sheet was sheet 1. Hope that helps! If you are still having troubles, post your code and someone will attempt to find the problem. Kevin -----Original Message----- Hi All, Ok, heres my prob. My code looks at a list of values(user names) in cells (231 in all) and checks for the existence of a filename depending on each value(username). Then if the file exists it opens it and is supposed to select range(B2:G25), then it copies the selection, activates the next window and selects the sheet associated with the value in the activecell in the original(username) sheet. Then it is supposed to paste the values in, close the sheet it copied from and carry on to the next one. The problem is the error Im getting above when it opens the users sheet! Help would be much appreciated as I can't see a real reason for the error. Its in Excel 97 on WinNT. Cheers All -- Joseph ---------------------------------------------------------- -------------- Joseph's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=5637 View this thread: http://www.excelforum.com/showthread...hreadid=264190 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run-Time error '1004' : Select method of Range class failed | Excel Discussion (Misc queries) | |||
VBA error 1004 "Select method of Range class failed" | Excel Programming | |||
excel97: runtime error 1004 select method of range class failed | Excel Programming | |||
error 1004 Select method of Range class failed | Excel Programming |