M
M G Henry
There seemed to be a problem with postings not coming up on the group
over the past couple of days, so I am reposting this to allow people
to see it again.
I have a partial solution outlined below but it has errors when I try
and run it.
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 .....
I am working with this on my desktop for testing purposes, but once I
get it working, the excel spreadsheet will reside on a network drive.
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.......
over the past couple of days, so I am reposting this to allow people
to see it again.
I have a partial solution outlined below but it has errors when I try
and run it.
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 .....
I am working with this on my desktop for testing purposes, but once I
get it working, the excel spreadsheet will reside on a network drive.
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.......