EBDN - Community - Question & Answers

  Monday, 17 August 2020
  2 Replies
  0.9K Visits
0
Votes
Undo
Hello everybody,

I would like to open (or print) an Excel file from EB. This works so far. But...
When the Excel file is open, I would like to automatically jump to a specific Excel sheet (e.g. "Tabelle2";)

This is not a problem in the Excel VBA environment. VBA does not recognize the active workbook or worksheet from EB. How can I control this from within the EB VBA environment.



Public Function DateiOeffnen(Aktion As String, Pfad As String, Ansicht As Long) As Boolean
Call ShellExecute(hWnd, Aktion, Pfad, "", "", Ansicht)
End Function


Sub testOpenFile()
Dim Pfad1 As String
Pfad1 = "C:\users\" & Environ("Username") & "\Desktop\EB_BoM & PrintList\TEST.xlsx"

DateiOeffnen "open", Pfad1, SW_MAXIMIZE
'DateiOeffnen "print", Pfad1, SW_MAXIMIZE
End Sub



greeting
Uwe