Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run-Time error '1004' : Select method of Range class failed | Excel Discussion (Misc queries) | |||
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 |