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


Dim users, Usersheet, date1 As String

Sheets("Sheet3").Select
Range("A1").Select
date1 = InputBox("Enter a date")
For i = 1 To 231
While Len(ActiveCell.Value) 0
users = ActiveCell.Value
If Dir("P:\clevedon staff\activities\" & users & "\" & users & date1 &
".xls") < "" Then
'users = ActiveCell.Value
'Do the stuff here


MsgBox ("File Exists")
Workbooks.Open FileName:= _
"\\FP06\apps\Clevedon Staff\Activities\" & users & "\" & users &
date1 & ".xls"

Range("B2:G25").Select 'error occurs here
Selection.Copy
ActiveWindow.ActivateNext
Range("B2:G25").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Usersheet = ActiveCell.Value
Sheets(Usersheet).Close
Sheets("sheet3").Select

ActiveCell.Offset(1, 0).Select
Else

ActiveCell.Offset(1, 0).Select
End If
Wend
Next i

End Sub


--
Joseph


------------------------------------------------------------------------
Joseph's Profile: http://www.excelforum.com/member.php...fo&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
select method of range class failed Joseph[_38_] Excel Programming 1 September 28th 04 03:21 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 10:50 PM.

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"