santa12345
Board Regular
- Joined
- Dec 2, 2020
- Messages
- 70
- Office Version
- 365
- Platform
- Windows
Hello.
I have the following code that works.
Sub sbVBA_To Open_Workbook()
Dim wb As Workbook
Set wb = Workbooks.Open("C:\Users\testuser\Desktop\export\order1.xls")
My question is... can the current vb code be changed to accommodate any file name?
Meaning I will export one file to the export folder. The filename could be order1.xls, order2.xls, customername.xls, customer.xls, etc..
But it will be the only file in the export folder.
Please let me know if this is possible.
Thank you!
I have the following code that works.
Sub sbVBA_To Open_Workbook()
Dim wb As Workbook
Set wb = Workbooks.Open("C:\Users\testuser\Desktop\export\order1.xls")
My question is... can the current vb code be changed to accommodate any file name?
Meaning I will export one file to the export folder. The filename could be order1.xls, order2.xls, customername.xls, customer.xls, etc..
But it will be the only file in the export folder.
Please let me know if this is possible.
Thank you!