Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Changes to a VBA code
Hi Guys, I got this awhile back, and VBA not being my strongest area I
was just wondering if it could be changed? I need to change instead of using "Client Name.xls" I need the text in cell "B13" to be used which would be the clients name. Any help would be great Thanks Sub SaveOneFile() Dim fn As Variant fn = Application.GetSaveAsFilename("Client Name.xls", _ "Quote Form,*.xls", 1, "Select your folder and filename") If TypeName(fn) = "Boolean" Then Exit Sub ActiveWorkbook.SaveAs fn End Sub |
#2
|
|||
|
|||
fn = Application.GetSaveAsFilename(Worksheets("Sheet1") .Range("B13"), _
"Quote Form,*.xls", 1, "Select your folder and filename") Please change the worksheet name as per your requirement Mangesh wrote in message oups.com... Hi Guys, I got this awhile back, and VBA not being my strongest area I was just wondering if it could be changed? I need to change instead of using "Client Name.xls" I need the text in cell "B13" to be used which would be the clients name. Any help would be great Thanks Sub SaveOneFile() Dim fn As Variant fn = Application.GetSaveAsFilename("Client Name.xls", _ "Quote Form,*.xls", 1, "Select your folder and filename") If TypeName(fn) = "Boolean" Then Exit Sub ActiveWorkbook.SaveAs fn End Sub |
#3
|
|||
|
|||
Fantastic that works great, the only problem I have is this code is
used in six sheets all with different titles. I'm not sure how to write this into the code. |
#4
|
|||
|
|||
Maybe Instead of using the
Worksheets("Sheet1") try: Activesheet wrote in message oups.com... Fantastic that works great, the only problem I have is this code is used in six sheets all with different titles. I'm not sure how to write this into the code. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change case...help please | Excel Worksheet Functions | |||
Macro for changing text to Proper Case | Excel Worksheet Functions | |||
Using other workbooks.. | Excel Worksheet Functions | |||
Make Change Case in Excel a format rather than formula | Excel Worksheet Functions | |||
Opening a file with code without a set file name | Excel Discussion (Misc queries) |