![]() Set myNewXL = CreateObject("Excel. MyActiveXL.Quit: 'if the active workbook is different from excelfilename, then close. In case you made changes push activate and save", vbOKOnly + vbExclamation, "ANOTHER Response = MsgBox("The programm " & & " is still running. Open the workbook and your toolbar appears. Set myActiveXL = GetObject(, "Excel.Application") Free Excel 2011 Toolbar A free toolbar for Microsoft Excel 2011 by Jim Gordon, Microsoft Macintosh MVP and co-author of Office 2011 for Mac All-in-One For Dummies So Easy Just download an Excel workbook. StrFullFilename = Environ("homedrive") & Environ("homepath") & "\documents" & excelfilename ![]() 'SendMessageA hwnd, WM_user + 18, 0, 0: 'is possible but not interesting for me. I have amended my program now as follows and it works. Set MyXL = GetObject("C:\Users\Jan Straatman\Documents\test.xlsx") If Err.Number 0 Then excelwasnotrunning = True Set MyXL = GetObject(",Excel.Application") Private Declare PtrSafe Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hwnd As LongPtr, ByVal wMsg As LongPtr, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr Private Declare PtrSafe Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As LongPtr) As LongPtr I have ammended the following programcode for 365, but I am not quite sure Now Excel is not opening in this way any longer. This was working perfectly until I switched to Office 365. I try to open an Excel file test.xlms using a button in my Access program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |