Hi all,
So I'm using a userform to open a particular file via a vlookup from 2 combobox inputs. However, it won't work with non excel files. Can anyone help me with this?
I use the following code:
However, some of the files are Word documents & Publisher files and obviously workbooks.open won't let you do this. Is there a way that it will open the file from the cell reference irrespective of what type of file it is?
Thanks in advance for any help anyone can give me.
So I'm using a userform to open a particular file via a vlookup from 2 combobox inputs. However, it won't work with non excel files. Can anyone help me with this?
I use the following code:
Code:
Private Sub OkButton_Click()
Dim loc As Variant
loc = Application.VLookup(Me.ComboBox2.Value, Sheets("Locations").Range("B2:c2525"), 2, True)
Workbooks.Open (loc)
However, some of the files are Word documents & Publisher files and obviously workbooks.open won't let you do this. Is there a way that it will open the file from the cell reference irrespective of what type of file it is?
Thanks in advance for any help anyone can give me.