Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Could someone provide me with code to do the following please: While using Access I and need to open an Excel spread sheet then save it. I can do this using Excel only, but need to do this within Access Please help Dave -- Please type david.com inplace of no.thanks. Sorry for the inconvenience but fed up of spam mail. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Look in VBA help for createobject and getobject
Dim xlApp as Object Dim xlBook as Object Dim xlSheet as Object set xlApp = CreateObject("Excel.Application") set xlBook = xlApp.Workbooks.Open "C:\My Folder\MyFile.xls" ' or 'Set xlBook = xlApp.Workbooks.Add Set xlSheet = xlBook.Worksheets(1) xlSheet.Cells(1,1).Value = 1 xlBook.Save ' or xlBook.SaveAs "C:\My Folder\MyFile1.xls" xlBook.close SaveChanges:=False set xlsheet = nothing set xlBook = nothing xlApp.Quit set xlApp = Nothing some references: http://support.microsoft.com/support...aqVBOffice.asp Frequently Asked Questions about Microsoft Office Automation Using Visual Basic http://support.microsoft.com/support...fdevinapps.asp Programming Office from Within Office http://support.microsoft.com/support...dev/iisfaq.asp Integrating Office with IIS FAQ http://support.microsoft.com/?id =219151 Q219151 - HOWTO: Automate Excel 97 and Excel 2000 from Visual Basic http://support.microsoft.com/support...automation.asp Using Automation with Microsoft Excel 97 http://support.microsoft.com/?id=153748 ACC: How to Call Excel Functions from Within Microsoft Access Automating Excel from VB and from Access is identical. -- Regards, Tom Ogilvy "Dave" wrote in message ... Hi Could someone provide me with code to do the following please: While using Access I and need to open an Excel spread sheet then save it. I can do this using Excel only, but need to do this within Access Please help Dave -- Please type david.com inplace of no.thanks. Sorry for the inconvenience but fed up of spam mail. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here are two mo
http://support.microsoft.com/?id=153748 ACC: How to Call Excel Functions from Within Microsoft Access http://support.microsoft.com/?id=167223 Microsoft Office 97 Automation Help File Available on MSL -- Regards, Tom Ogilvy "Dave" wrote in message ... Hi Could someone provide me with code to do the following please: While using Access I and need to open an Excel spread sheet then save it. I can do this using Excel only, but need to do this within Access Please help Dave -- Please type david.com inplace of no.thanks. Sorry for the inconvenience but fed up of spam mail. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening files | Excel Discussion (Misc queries) | |||
show most recent files first when opening excel files | Excel Discussion (Misc queries) | |||
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 | Excel Discussion (Misc queries) | |||
How can I view files chronologically when opening multiple files | Excel Discussion (Misc queries) | |||
opening files | Excel Programming |