Hi,

I am trying to open a file for which I have the partial name .i.e. starting part in a excel cell defined as a string and the ending part is some unique code which keeps changing so can't be hard coded, so here is how i am trying to open the same but it's not working. can someone help
Code:
'Code:
Dim Workbookpath As String
Dim Filenameknownpart As String

Workbookpath = ThisWorkbook.Sheets("Parameters").Range("A2").Value
Filenameknownpart  = ThisWorkbook.Sheets("Parameters").Range("B2").Value

Workbooks.Open Filename:= Workbookpath & "\" & Filenameknownpart & "******" & ".xls"

Note: i have used asterisk to define the unique code which is six digit as of now but may go up, that is beyond 6 digit in future so don't want to keep it limited to 6 digits, also it's unique everyday so can't be hard coded anyway.


Previously posted on mrexcel but not got the solution yet. below is the link:

https://www.mrexcel.com/forum/excel-...ined-part.html