Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, I'm still having a problem copying sheet 2, in this code (named card to the opened workbook. Here's the code I'm working on. When I run it, I get "Subscript Out O Range". It runs then stops on the added worksheet, but on sheet 1. Please, have a look: [color=RoyalBlue]Sub test() Columns("A:I").Copy Workbooks.Add Columns("A:I").PasteSpecial Paste:=xlPasteFormats Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone SkipBlanks _ :=False, Transpose:=False Range("D1").Select Application.CutCopyMode = False Workbooks(SolidWorksheet).Activate Sheets("card").Select Columns("A:I").Copy Workbooks(Book13).Activate Sheets("Sheet2").Select Columns("A:I").PasteSpecial Paste:=xlPasteFormats Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone SkipBlanks _ :=False, Transpose:=False Range("D1").Select Application.CutCopyMode = False Sheets("Sheets1").Select ActiveWorkbook.SaveAs Filename:= _ "c:\Books\" & Format(Date, "mm-dd-yyyy") & " Sunday Worksheet.xls ' _ FileFormat:=xlNormal, Password:="", WriteResPassword:=""' _ ReadOnlyRecommend:=False, CreateBackup:=False ActiveWorkbook.Close returnvalue = MsgBox("Don't Forget To Put All Deposit Slips In Th Book", 64, "Secretary's Message") If returnvalue = 1 Then 'User chose OK End If End Sub Thanks, EMo -- EMo ----------------------------------------------------------------------- EMoe's Profile: http://www.excelforum.com/member.php...fo&userid=2318 View this thread: http://www.excelforum.com/showthread.php?threadid=37414 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need help Taking alot data from one sheet (if not blank) and copying toa list on another sheet. | Excel Worksheet Functions | |||
Copying the repeated data of the previous sheet to the next sheet | Excel Discussion (Misc queries) | |||
Dynamic column chart - copying from Sheet to Sheet. | Excel Discussion (Misc queries) | |||
Dynamic column chart - copying from Sheet to Sheet. | Charts and Charting in Excel | |||
2 questions, copying data from sheet to sheet and assigning macro | Excel Worksheet Functions |