• • • • • • • • • Important Notice: Hire Help Rules Dear, please note that the terms and conditions of the HIRE HELP forum have been updated and can be found here ( ) as well as in the forum description. We ask you to familiarize yourself and contact admin if you have any questions. ![]() - OzGrid Administrators • If this is your first visit, be sure to check out the by clicking the link above. You may have to before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. If you don't like Google AdSense in the posts, or log in above. Code: Private Sub CmdOpenExcel_Click() 'WillR - opens the specified Spreadsheet Dim xlApp As Excel.Application Dim xlWB As Excel.Workbook Set xlApp = New Excel.Application With xlApp.Visible = True Set xlWB =.Workbooks.Open('R: path path2 path3 xlfilename.xls',, False) End With End SubHope it helps - I have found it useful. NB: You will need to set a reference to the Excel Object Library in the Visual Basic Editor in MS Access. To do this, Open the Access VBE (ALT + F11) Go to Tools|References Check the box next to the relevant Excel Library (for example Microsoft Excel 9.0 Object Library if using Office 2000) Click OK. For ex: I have the following code to open existing excel. Do some activity and then close the excel. In my Excel I have few lines of code which I would like to run by enabling Excel macro in the code below when I open the file. What options do I need to use to enable macro? Dim XLapp As New Excel.Application Dim ObjXL As Excel.Workbook Set ObjXL = XLapp.Workbooks.Open('C: reports adhoc default.xls') ObjXL.Application.Visible = True ObjXL.Windows(1).Visible = True ObjXL.Worksheets(1).Activate ObjXL.Save ObjXL.Close XLapp.Quit Is that security issues? And absolutely no possible? Any suggestions? ![]() Thank you for all your help. For ex: I have the following code to open existing excel. Do some activity and then close the excel. In my Excel I have few lines of code which I would like to run by enabling Excel macro in the code below when I open the file. What options do I need to use to enable macro? Dim XLapp As New Excel.Application Dim ObjXL As Excel.Workbook Set ObjXL = XLapp.Workbooks.Open('C: reports adhoc default.xls') ObjXL.Application.Visible = True ObjXL.Windows(1).Visible = True ObjXL.Worksheets(1).Activate ObjXL.Save ObjXL.Close XLapp.Quit Is that security issues? And absolutely no possible? Any suggestions? Thank you for all your help. What declarations I have to make in order to be able to use Excel objects and constants from my Access 2007. How to refer to Excel objects in Access. Jan 09, 2013 Hi, i am trying to use Excel 2007 to open Active Directory - showing users / computers / groups in Excel. I would like to open Actice Directory via 'Get.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2018
Categories |