View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default SaveAs using Hyperlink/Path in a cell

Cell A1 has H:\Myfolder\ entered. Then:

Sub ost()
Dim MyFile As String
MyFile = "sjb"
pathh = Range("A1").Value
tagg = Format(Now(), "mmddyy_hhmmss")
MsgBox (tagg)
ActiveWorkbook.SaveAs Filename:=pathh & MyFile & tagg & ".xls"
End Sub

--
Gary''s Student - gsnu200801


"SJW_OST" wrote:

I would like to enter the path to where I want to SaveAs in a cell either as
a regular entry or a Hyperlink, whichever way will work best, and have my VB
code use that Hyperlink path and auto save file name to save a workbook.
Example;
Cell A1 has H:\Myfolder entered or hyperlink

My VB code would perform a "ActiveWorkbook.SaveAs Filename:=" senerio and at
this point it would read Cell A1 for the path and use
\" & "MyFile_" & format(now,"mmddyy_hhmmss") & ".xls or some other naming
convention like just \MyFile.xls to name the file.

Is this possible? Your help is greatly apprpeciated.