Forum Discussion
kheldar
Apr 11, 2022Iron Contributor
wb.Name Like VBA Not Working, Most of the Time
Hello, This code below sometimes works sometimes doesn't. I don't get why. The file is in CSV format. Also, adding Debug.Print wb.Name line produces a result of the csv file not being display...
- Apr 11, 2022
On the safer side, you may change the logical test as below to remove any leading space in the file name and ignore the letter case and see if this works for you...
If Trim(LCase(wb.Name)) Like "data-*" Then
Subodh_Tiwari_sktneer
Apr 11, 2022Silver Contributor
On the safer side, you may change the logical test as below to remove any leading space in the file name and ignore the letter case and see if this works for you...
If Trim(LCase(wb.Name)) Like "data-*" Then