L
lecoughlin
Hi All,
I have the following VBA code that opens an Excel file from my Access
database. Does anyone know how I would write the code to rename the
file? For example, rename "_ABC_123" to "ABC_123"
Thanks in advance!
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)",
"*.XLS")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
Dim db As DAO.Database
Dim myRec As DAO.Recordset
Set xlApp = CreateObject("Excel.Application")
Set xlApp = CreateObject("Excel.Application")
Set xlWrkBk = xlApp.Workbooks.Open(strInputFileName)
Set db = CurrentDb
I have the following VBA code that opens an Excel file from my Access
database. Does anyone know how I would write the code to rename the
file? For example, rename "_ABC_123" to "ABC_123"
Thanks in advance!
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)",
"*.XLS")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
Dim db As DAO.Database
Dim myRec As DAO.Recordset
Set xlApp = CreateObject("Excel.Application")
Set xlApp = CreateObject("Excel.Application")
Set xlWrkBk = xlApp.Workbooks.Open(strInputFileName)
Set db = CurrentDb