K
Kieran1028
Follow-up on my last thread (which was answered, thus the new thread
but same project...)
At the beginning of my code, I use getopenfilename and then open
workbook. I want a check (if/then?) between the getopenfilename an
the open command, that will check to see if the filename entered i
already open, if it is, skip the open command and continue with th
rest of the code. Make sense? This is what I have:
Sub get1degdata()
Dim fname As Variant
Dim Wkbk As Workbook
Dim wksht As Worksheet
fname = Application.GetOpenFilename("Excel files(*.xls),*.xls")
Set Wkbk = Workbooks.Open(fname)
Wkbk.Activate
MsgBox fname
but same project...)
At the beginning of my code, I use getopenfilename and then open
workbook. I want a check (if/then?) between the getopenfilename an
the open command, that will check to see if the filename entered i
already open, if it is, skip the open command and continue with th
rest of the code. Make sense? This is what I have:
Sub get1degdata()
Dim fname As Variant
Dim Wkbk As Workbook
Dim wksht As Worksheet
fname = Application.GetOpenFilename("Excel files(*.xls),*.xls")
Set Wkbk = Workbooks.Open(fname)
Wkbk.Activate
MsgBox fname