Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Thankyou very much for your help this worked well...
"JE McGimpsey" wrote: This is rather an FAQ if you look in the archives: http://groups.google.com/advanced_gr...=group:*excel* One way: Public Sub SaveInB2AsA2() Const sPATH As String = "R:/SALES/Team 318/" ThisWorkbook.SaveAs _ Filename:=sPATH & Range("B2").Text & _ Application.PathSeparator & Range("A2").Text & ".xls" End Sub In article , "Andy" wrote: Two cells A1 & B2 I am trying to create a Macro to attach to a button to Save an .xls as "A1".xls in directory R:/SALES/Team 318/"B2" instead of typing it in all of the time.... Any helpers? Past attempts at this have failed.....the winner will get a big MVP vote! |
#2
![]() |
|||
|
|||
![]()
Thanks Jason. There was a bug in this that I couldnt work out. Thanks for
your help though. The next three worked.... "Jason Morin" wrote: Try something like: Sub Test() Dim mypath As String Dim sfile As Range, sdir As Range mypath = "R:\SALES\Team 318\" Set sfile = Sheets("Sheet1").Range("A1") Set sdir = Sheets("Sheet1").Range("B2") ThisWorkbook.SaveAs Filename:=mypath & sdir & "\" & sfile End Sub --- HTH Jason Atlanta, GA -----Original Message----- Hi Two cells A1 & B2 I am trying to create a Macro to attach to a button to Save an .xls as "A1".xls in directory R:/SALES/Team 318/"B2" instead of typing it in all of the time.... Any helpers? Past attempts at this have failed.....the winner will get a big MVP vote! Absolute respect Andy . |
#3
![]() |
|||
|
|||
![]()
thanks for this. It worked.
"tjtjjtjt" wrote: Andy, I just copied the filepath from your post-- As the other posts show, if you are on a Windows machine, the slashes from your filepath are going the wrong way. tj "tjtjjtjt" wrote: How about something like this: Sub SvFile() ActiveWorkbook.SaveAs Filename:= _ "R:/SALES/Team 318" & Range("B1").Value _ & "\" & Range("A1").Value & ".xls" End Sub tj "Andy" wrote: Hi Two cells A1 & B2 I am trying to create a Macro to attach to a button to Save an .xls as "A1".xls in directory R:/SALES/Team 318/"B2" instead of typing it in all of the time.... Any helpers? Past attempts at this have failed.....the winner will get a big MVP vote! Absolute respect Andy |
#4
![]() |
|||
|
|||
![]()
Thanks Bob.....this did the trick as it was the least code for the three
responses. I appreciate your help. Youre not from Brisbane? "Bob Phillips" wrote: ActiveWorkbook.SaveAs Filename:= "R:\SALES\Team 318\" & Range("B1").Value & "\" & Range("A1").Value & ".xls" -- HTH RP (remove nothere from the email address if mailing direct) "Andy" wrote in message ... Hi Two cells A1 & B2 I am trying to create a Macro to attach to a button to Save an .xls as "A1".xls in directory R:/SALES/Team 318/"B2" instead of typing it in all of the time.... Any helpers? Past attempts at this have failed.....the winner will get a big MVP vote! Absolute respect Andy |
#5
![]() |
|||
|
|||
![]()
Not quite, South Coast of England.
-- HTH RP (remove nothere from the email address if mailing direct) "Andy" wrote in message ... Thanks Bob.....this did the trick as it was the least code for the three responses. I appreciate your help. Youre not from Brisbane? "Bob Phillips" wrote: ActiveWorkbook.SaveAs Filename:= "R:\SALES\Team 318\" & Range("B1").Value & "\" & Range("A1").Value & ".xls" -- HTH RP (remove nothere from the email address if mailing direct) "Andy" wrote in message ... Hi Two cells A1 & B2 I am trying to create a Macro to attach to a button to Save an .xls as "A1".xls in directory R:/SALES/Team 318/"B2" instead of typing it in all of the time.... Any helpers? Past attempts at this have failed.....the winner will get a big MVP vote! Absolute respect Andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Embedding file name in a Cell | Links and Linking in Excel | |||
File asks to update when no links were created | Links and Linking in Excel |