Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Problem is solved, posting final code, then editing title of main post :) Thanks for the help guys. Code ------------------- Private Sub cmdSave_Click() Dim SavePath As String Dim SaveFile As String If Range("G1") = "" Then MsgBox ("You must have a Product/Routing No. to save!") Else Range("A1:G47").Select Selection.Copy Workbooks.Add Selection.PasteSpecial Paste:=xlPasteValues Selection.PasteSpecial Paste:=xlPasteFormats Sheets(Array("Sheet2", "Sheet3")).Select ActiveWindow.SelectedSheets.Delete Sheets("Sheet1").Name = "Procedures" ActiveSheet.Columns("A:G").EntireColumn.AutoFit SavePath = "N:\Procedures\Customer Info\" SaveFile = Range("G1") ActiveWorkbook.SaveAs (SavePath & SaveFile & ".xls") ActiveWindow.Close Sheets("Customer").Select Sheets("Customer").Range( _ "B1,B2,B3,B5,B6,B7,B8,B13,B14,B15,B16,B19,B20,B21, G1,G3,I5,I6,I7,I8,I9,G13,G15,G17,G19" _ ).Select Selection.ClearContents Sheets("Procedure").Select Range("A1").Select End If End Sub ------------------- -- Cap ----------------------------------------------------------------------- Capo's Profile: http://www.excelforum.com/member.php...fo&userid=3728 View this thread: http://www.excelforum.com/showthread.php?threadid=56990 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select Method of Range class failed | Excel Programming | |||
Select method of range class failed | Excel Programming | |||
select method of range class failed | Excel Programming | |||
select method of range class failed | Excel Programming | |||
select method of range class failed | Excel Programming |