Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-Time error '1004' : Select method of Range class failed [email protected] Excel Discussion (Misc queries) 3 March 9th 07 01:36 PM
VBA error 1004 "Select method of Range class failed" Matt J Excel Programming 6 July 3rd 04 10:05 PM
excel97: runtime error 1004 select method of range class failed JMCN Excel Programming 4 December 25th 03 05:32 AM
error 1004 Select method of Range class failed J.E. McGimpsey Excel Programming 1 September 12th 03 07:42 PM


All times are GMT +1. The time now is 04:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"