Hello,
I think that you can just replace [in macro btn_ImportSheets_Click()]:
Const strFldrPath As String = "H:\Excel Testing\"
'with 2 new lines
'
dim strFldrPath As String
strFldrPath = sheets("Path Name").cells(1,1).value 'get path name from worksheet "Path Name"; You should change formatting into "text" in "Path Name" at Range A1 and type without double quote (only H:\Excel Testing\)
and in place where worksheets are delated you have to secure your path sheet so please consider to change one more line:
'now
If ws.Name <> "SheetList" Then
' replace into:
If ws.Name <> "SheetList" and ws.Name <> "Path Name" Then
Best Regards
maczaq
Bookmarks