ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Saving to a Network Path using VBA (https://www.excelbanter.com/excel-programming/274083-saving-network-path-using-vba.html)

Mike R

Saving to a Network Path using VBA
 

Hi Guys,

I may be asking a bit much with this! but any guidance is
very much appreciated.

I have recently written an add-in that will be used very
frequently. What I would like to do is make the user
enter a job number in a an input box on opening the add-in
file, and then for this file to be saved to a
predetermined network path with the entered number i.e.
J:\addin\"jobnumber.xls".

Is this possible?

Thanks for your help in advance


Michael


Ron de Bruin

Saving to a Network Path using VBA
 
Try this

Sub test()
Dim mynum As Long
Dim yoursavestring As String
mynum = Application.InputBox("Enter a number", Type:=1)
yoursavestring = "J:\addin\jobnumber" & mynum & ".xls"
ActiveWorkbook.SaveAs yoursavestring
End Sub

you must also check if the file not exist

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Mike R" wrote in message ...

Hi Guys,

I may be asking a bit much with this! but any guidance is
very much appreciated.

I have recently written an add-in that will be used very
frequently. What I would like to do is make the user
enter a job number in a an input box on opening the add-in
file, and then for this file to be saved to a
predetermined network path with the entered number i.e.
J:\addin\"jobnumber.xls".

Is this possible?

Thanks for your help in advance


Michael





All times are GMT +1. The time now is 04:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com