Hi y'all,
As I am still a total vba newbie, I need some of your expert help ...
I need a macro that gives the user a dialog-box where he/she can specify an xls file to be opened, unless it is already open. In that case I need a message saying that the file is already in use.
this is what I already managed to do:
There is still something wrong with the line Workbooks.Open Filename:=path because after running the macro, the editor makes this line yellow...
Dunno how to fix it
one more thing, anybody knows a good tutorial how to make a shortcut button for this/a macro
This message was edited by mrpink on 2002-10-02 09:25
As I am still a total vba newbie, I need some of your expert help ...
I need a macro that gives the user a dialog-box where he/she can specify an xls file to be opened, unless it is already open. In that case I need a message saying that the file is already in use.
this is what I already managed to do:
Code:
Sub Inputfile()
Dim path As String
path = InputBox("Enter the location of the file in this Input Box :", _
, "enter file location here")
If path<> "" Then MsgBox path
Workbooks.Open Filename:=path
End Sub
There is still something wrong with the line Workbooks.Open Filename:=path because after running the macro, the editor makes this line yellow...
Dunno how to fix it
one more thing, anybody knows a good tutorial how to make a shortcut button for this/a macro
This message was edited by mrpink on 2002-10-02 09:25