Command button save Excel spreadsheet in tab delimeted format

M

M G Henry

Is it possible to have a command button on an Access form go to an
Excel spreadsheet which resides on a network drive and have it save a
tab delimeted version of the spreadsheet to a network users local
drive ? The name and location of the excel spreadsheet would not
change and the name of the file that would be saved on the users local
drive could be overwritten each time.

Basically what I am looking for is a tab delimeted snapshot of the
spreadsheet at any given time, The spread sheet is updated throughout
the day.

Thanks in advance for your assistance.
 
M

M G Henry

Is it possible to have a command button on an Access form go to an
Excel spreadsheet which resides on a network drive and have it save a
tab delimeted version of the spreadsheet to a network users local
drive ?  The name and location of the excel spreadsheet would not
change and the name of the file that would be saved on the users local
drive could be overwritten each time.

Basically what I am looking for is a tab delimeted snapshot of the
spreadsheet at any given time,  The spread sheet is updated throughout
the day.

Thanks in advance for your assistance.

I am close, I think ????.......

From other user groups I have modified the following code I have
called the function Testfile and the workbook I am trying to open is
PRODUCTION SCHED2.xls and I am saving it as Test1.txt but when I try
and run the code from a macro I get the following error Compile
error: User-defined type not defined .....

Function Testfile()
'
'
'
'
Dim xlApp As Excel.Application
Dim xlWB1 As Excel.Workbook
Set xlApp = New Excel.Application
xlApp.Visible = True
Set xlWB1 = xlApp.Workbooks.Open("C:\Documents and Settings\HenryM
\Desktop\PRODUCTION SCHED2.xls")
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\HenryM\Desktop\Test1.txt",
FileFormat:=xlText, _
CreateBackup:=False

xlWB1.Close
Set xlWB1 = Nothing
xlApp.Quit
Set xlApp = Nothing

End Function


Any assistance would be greatly appreciated.......
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top