I am trying to try and get my macro to work but struggling. Any help please.
in the same dir as where my sheet with the code is I save a files. They have different names and I want to be able to open the correct file to work on. The file names can be long but they tend to have some short easy to remember model codes.
I would like therefore to be able to just type in *x123* in to the inputbox and this would open the file test_macro_x123_test.xls, or if i type L888 it would open the file test_macro_L888_test.xls.
Dim filename1 As String
filename1 = InputBox("enter model code")
Workbooks.Open filename:=ThisWorkbook.Path & "\" & filename1 & ".xls"
in the same dir as where my sheet with the code is I save a files. They have different names and I want to be able to open the correct file to work on. The file names can be long but they tend to have some short easy to remember model codes.
I would like therefore to be able to just type in *x123* in to the inputbox and this would open the file test_macro_x123_test.xls, or if i type L888 it would open the file test_macro_L888_test.xls.
Dim filename1 As String
filename1 = InputBox("enter model code")
Workbooks.Open filename:=ThisWorkbook.Path & "\" & filename1 & ".xls"