How To Save File With User Enter path with Input BOX

AT BABU

Board Regular
Joined
Oct 12, 2018
Messages
54
Office Version
  1. 2016
Platform
  1. Windows
Hello Every one


Dim T as Variant
T = InputBox("Enter Your CORP ID")

ChDir "\\Client\C$\Users\T\Desktop"
ActiveWorkbook.SaveAs Filename:= _
"\\Client\C$\Users\T\Desktop\From Application to MIS_V.0.1.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False

I have above code but code notrun , I get Run Time Error 76 Path not found
 
Last edited by a moderator:

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
A way to get the path of the file is to place a file in that directory and then right click on it, then click "properties". Under location you can see the path. Check if that is the same.
 
Upvote 0
Hi & welcome to MrExcel
Try
Code:
Dim T As Variant
Dim Pth As String
T = InputBox("Enter Your CORP ID")
Pth = "\\Client\C$\Users\" & T & "\Desktop\"

ActiveWorkbook.SaveAs filename:= _
Pth & "From Application to MIS_V.0.1.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top