Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all...
this works in a macro but not in code.. Workbooks.Open Filename:="C:\1040WP\K1_Info.xls" Sheets("K1_Info").Select Range("A1:J100").Select <--- HANGS UP HERE!! Selection.Copy Windows("Electronic Workpapers-Final V 1.1.6.xls").Activate Sheets("G-2").Select Range("A11").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A11").Select Can someone tell me what I'm doing wrong? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi TimT,
Range("A1:J100").Select <--- HANGS UP HERE!! Try: Sheets("K1_Info").Range("A1:J100").Select --- Regards, Norman "TimT" wrote in message ... Hello all... this works in a macro but not in code.. Workbooks.Open Filename:="C:\1040WP\K1_Info.xls" Sheets("K1_Info").Select Range("A1:J100").Select <--- HANGS UP HERE!! Selection.Copy Windows("Electronic Workpapers-Final V 1.1.6.xls").Activate Sheets("G-2").Select Range("A11").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A11").Select Can someone tell me what I'm doing wrong? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
that worked!
I have another question if you could help... Another part of the code call for the sheet to be saved as a .dif file. before the code ends it asks for confirmation that would require a yes to the dialog box. is there a way to answer yes automatically? "Norman Jones" wrote: Hi TimT, Range("A1:J100").Select <--- HANGS UP HERE!! Try: Sheets("K1_Info").Range("A1:J100").Select --- Regards, Norman "TimT" wrote in message ... Hello all... this works in a macro but not in code.. Workbooks.Open Filename:="C:\1040WP\K1_Info.xls" Sheets("K1_Info").Select Range("A1:J100").Select <--- HANGS UP HERE!! Selection.Copy Windows("Electronic Workpapers-Final V 1.1.6.xls").Activate Sheets("G-2").Select Range("A11").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A11").Select Can someone tell me what I'm doing wrong? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tim.
Try something like: Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="YourFileName.dif", _ FileFormat:=xlDIF, CreateBackup:=False Application.DisplayAlerts = True --- Regards, Norman "TimT" wrote in message ... that worked! I have another question if you could help... Another part of the code call for the sheet to be saved as a .dif file. before the code ends it asks for confirmation that would require a yes to the dialog box. is there a way to answer yes automatically? "Norman Jones" wrote: Hi TimT, Range("A1:J100").Select <--- HANGS UP HERE!! Try: Sheets("K1_Info").Range("A1:J100").Select --- Regards, Norman "TimT" wrote in message ... Hello all... this works in a macro but not in code.. Workbooks.Open Filename:="C:\1040WP\K1_Info.xls" Sheets("K1_Info").Select Range("A1:J100").Select <--- HANGS UP HERE!! Selection.Copy Windows("Electronic Workpapers-Final V 1.1.6.xls").Activate Sheets("G-2").Select Range("A11").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A11").Select Can someone tell me what I'm doing wrong? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yeah I just realized that.....
Thank you so much brah! "Norman Jones" wrote: Hi Tim. Try something like: Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="YourFileName.dif", _ FileFormat:=xlDIF, CreateBackup:=False Application.DisplayAlerts = True --- Regards, Norman "TimT" wrote in message ... that worked! I have another question if you could help... Another part of the code call for the sheet to be saved as a .dif file. before the code ends it asks for confirmation that would require a yes to the dialog box. is there a way to answer yes automatically? "Norman Jones" wrote: Hi TimT, Range("A1:J100").Select <--- HANGS UP HERE!! Try: Sheets("K1_Info").Range("A1:J100").Select --- Regards, Norman "TimT" wrote in message ... Hello all... this works in a macro but not in code.. Workbooks.Open Filename:="C:\1040WP\K1_Info.xls" Sheets("K1_Info").Select Range("A1:J100").Select <--- HANGS UP HERE!! Selection.Copy Windows("Electronic Workpapers-Final V 1.1.6.xls").Activate Sheets("G-2").Select Range("A11").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A11").Select Can someone tell me what I'm doing wrong? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
.... Workbooks.Open Filename:="C:\1040WP\K1_Info.xls" Sheets(K1_Info").Range("A1:J100").Copy Sheets("G-2").Range("A11").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks :=False, Transpose:=False .... Arvi Laanemets "TimT" wrote in message ... Hello all... this works in a macro but not in code.. Workbooks.Open Filename:="C:\1040WP\K1_Info.xls" Sheets("K1_Info").Select Range("A1:J100").Select <--- HANGS UP HERE!! Selection.Copy Windows("Electronic Workpapers-Final V 1.1.6.xls").Activate Sheets("G-2").Select Range("A11").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A11").Select Can someone tell me what I'm doing wrong? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
Sub CopyWkBookToWkBook() Set SWB = Workbooks.Open("sourceworkwb.xls") Set DWB = Workbooks("destinationwb.XLS") SWB.Sheets("CHECKS").Range("a8:b15").Copy _ DWB.Sheets("SHEET9").Range("a1") SWB.Close SaveChanges:=False End Sub -- Don Guillett SalesAid Software "TimT" wrote in message ... Hello all... this works in a macro but not in code.. Workbooks.Open Filename:="C:\1040WP\K1_Info.xls" Sheets("K1_Info").Select Range("A1:J100").Select <--- HANGS UP HERE!! Selection.Copy Windows("Electronic Workpapers-Final V 1.1.6.xls").Activate Sheets("G-2").Select Range("A11").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A11").Select Can someone tell me what I'm doing wrong? |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You said values SO (notice same size ranges)
Sub CopyWkBookToWkBookValues() Set SWB = Workbooks.Open("sourcewb.xls") Set DWB = Workbooks("destinationwb.XLS") DWB.Sheets("SHEET9").Range("a8:b15").Value = _ SWB.Sheets("CHECKS").Range("a8:b15").Value SWB.Close SaveChanges:=False End Sub -- Don Guillett SalesAid Software "TimT" wrote in message ... Hello all... this works in a macro but not in code.. Workbooks.Open Filename:="C:\1040WP\K1_Info.xls" Sheets("K1_Info").Select Range("A1:J100").Select <--- HANGS UP HERE!! Selection.Copy Windows("Electronic Workpapers-Final V 1.1.6.xls").Activate Sheets("G-2").Select Range("A11").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A11").Select Can someone tell me what I'm doing wrong? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofill method of range class failed | Excel Discussion (Misc queries) | |||
PasteSpecial method of Range class failed | Excel Programming | |||
Select method of range class failed | Excel Programming | |||
Insert method of range class failed | Excel Programming | |||
AutoFit method of Range class failed | Excel Programming |