LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Select method of Range class failed


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Method of Range class failed dircur Excel Programming 5 February 15th 06 03:15 AM
Select method of range class failed sa02000[_5_] Excel Programming 5 October 5th 05 09:10 AM
select method of range class failed Joseph[_40_] Excel Programming 0 September 28th 04 04:08 PM
select method of range class failed Joseph[_38_] Excel Programming 1 September 28th 04 03:21 PM
select method of range class failed Joseph[_39_] Excel Programming 0 September 28th 04 02:32 PM


All times are GMT +1. The time now is 07:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"