H
Harald Battran
Hi,
can anyone open my eyes on this strange problem:
I need to open a workbook on the fly to be able to read data from it
via VBA.
This piece of code is working while on a button called via click:
Sub Schaltfläche2_KlickenSieAuf()
Workbooks.Open ("C:\Dokumente und Einstellungen\name\Desktop
\Prototyp fuer Michael\Test2.xlsm")
End Sub
This piece is NOT working in a VBA module called with the formula
update in a cell :
Public Function Dateiopen()
Dim temp As Workbook
Set temp = Workbooks.Open("C:\Dokumente und Einstellungen\name
\Desktop\Prototyp fuer Michael\Test2.xlsm")
temp.Activate
End Function
by the way: this is also not working
Public Function Dateiopen()
Workbooks.Open("C:\Dokumente und Einstellungen\name\Desktop
\Prototyp fuer Michael\Test2.xlsm")
End Function
Both files are in the same folder. I am running Excel 2007 and have
only two causes I can think of
1) I am blind and missing something really important
2) There is a security setting I should check to allow the routine to
open up an external file.
Anyone out there who can help?
Much appreciated!
Harald Battran
can anyone open my eyes on this strange problem:
I need to open a workbook on the fly to be able to read data from it
via VBA.
This piece of code is working while on a button called via click:
Sub Schaltfläche2_KlickenSieAuf()
Workbooks.Open ("C:\Dokumente und Einstellungen\name\Desktop
\Prototyp fuer Michael\Test2.xlsm")
End Sub
This piece is NOT working in a VBA module called with the formula
update in a cell :
Public Function Dateiopen()
Dim temp As Workbook
Set temp = Workbooks.Open("C:\Dokumente und Einstellungen\name
\Desktop\Prototyp fuer Michael\Test2.xlsm")
temp.Activate
End Function
by the way: this is also not working
Public Function Dateiopen()
Workbooks.Open("C:\Dokumente und Einstellungen\name\Desktop
\Prototyp fuer Michael\Test2.xlsm")
End Function
Both files are in the same folder. I am running Excel 2007 and have
only two causes I can think of
1) I am blind and missing something really important
2) There is a security setting I should check to allow the routine to
open up an external file.
Anyone out there who can help?
Much appreciated!
Harald Battran