Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() the following syntax.. creates the apporpriate file "s" and opens it and gets me to the correct range. It however will not paste the information that was selected and copied. It gives me an error every time on ACTIVESHEET.PASTE. I get "run time error 1004".. paste method of worksheet class failed. Private Sub test2_Click() Range("C40:E40").Select Selection.Copy Dim s As String, bk As Workbook s = Range("othermanufact").Value & "-" & Range("lot").Value & "-" & Format(Range("exp").Value, "mmddyyyy") & ".xls" Set bk = Workbooks.Add() bk.SaveAs "C:\Program Files\PanelSelect\panels\" & s Workbooks.Open Filename:= _ "C:\Program Files\PanelSelect\panels\" & s ActiveWindow.Visible = True Windows(s).Activate Sheets("Sheet1").Range("c2").Activate ActiveSheet.paste <===error here every time End Sub help dr chuck |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copying and pasting to a different xls file in a different directo | Excel Programming | |||
copying from one file pasting in another | Excel Programming | |||
Pasting formulas without copying file ref. | Excel Programming | |||
Copying rows from one file and pasting into a new file | Excel Programming | |||
Copying rows from one file and pasting into a new file | Excel Programming |