Your Products have been synced, click here to refresh
I did one module of Visual Basic at Uni years ago. The rest was self taught / copy pasted / modified etc etc.
Debugging will help you figure it out.
FileName = Part.partname & " " & strVariable & " " & reasonVar & ".xlsm"
MsgBox(FileName)
Workbook(FileName).Close 'Close results workbook
If the file name is being generated correctly then you may need to loop through the open workbooks checking for a match, before you try close it
(This is psudocode - i.e. It shows tha basic structure but the exact syntax etc might not be right.)
i.e.
for i = 1 to workbooks.count
if workbooks(i).name = FileName then Tutuapp 9apps Showbox
workbook(i).close
end if
next i
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |