Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why does the following fail @ Range("D2").Select
Rum-time error '1004" Application-defined or object-defined error If I run the exact same code in a Macro it works fine Private Sub CommandButton1_Click() Workbooks.Add ActiveWorkbook.SaveAs Filename:="TempData.xls" Windows("testbook.XLS").Activate Range("D2:D7").Select Selection.Copy Windows("TempData.XLS").Activate Range("D2").Select ActiveSheet.Paste End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello!
I change one row, and it works me! Workbooks("TempData.XLS").Sheets(1).Range("D2").Se lect Regards Kari J Keinonen |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I replace "Windows("TempData.XLS").Activate" with
Workbooks("TempData.XLS").Sheets(1).Range("D2").Se lect I get a 1004 "Select method of Range class failed" at this new line oldjay "Kari J Keinonen" wrote: Hello! I change one row, and it works me! Workbooks("TempData.XLS").Sheets(1).Range("D2").Se lect Regards Kari J Keinonen |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hy!
I don't replace that row. Regards Kari J Keinonen "Oldjay" wrote: When I replace "Windows("TempData.XLS").Activate" with Workbooks("TempData.XLS").Sheets(1).Range("D2").Se lect I get a 1004 "Select method of Range class failed" at this new line oldjay "Kari J Keinonen" wrote: Hello! I change one row, and it works me! Workbooks("TempData.XLS").Sheets(1).Range("D2").Se lect Regards Kari J Keinonen |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What row did you replaced??
"Kari J Keinonen" wrote: Hy! I don't replace that row. Regards Kari J Keinonen "Oldjay" wrote: When I replace "Windows("TempData.XLS").Activate" with Workbooks("TempData.XLS").Sheets(1).Range("D2").Se lect I get a 1004 "Select method of Range class failed" at this new line oldjay "Kari J Keinonen" wrote: Hello! I change one row, and it works me! Workbooks("TempData.XLS").Sheets(1).Range("D2").Se lect Regards Kari J Keinonen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vlookup failure & ctrl-f failure? | Excel Discussion (Misc queries) | |||
VB's Command Button vs Form's Command Button | Excel Programming | |||
Command Button Macro Execution Failure | Excel Programming | |||
OnAction command failure | Excel Programming | |||
Command Button vs Control Button | Excel Programming |