Dear all,
I have the following problem:
1. Within my Excel-VBA-Code I refer to the internal code name of a sheet (e.g. Calculation. Range(rgRange))
2. If the user changes the sheet for which I programmed the reference “Calculation” I change the internal code name via ActiveWorkbook.VBProject.VBComponents(wsPVK1.CodeName).Name = "Calculation" (and provide the original sheet with another CodeName before)
Everything works fine until I want to access Calculation.xxx in the same procedure directly after changing it. The CodeName remains the same as before and the change becomes only valid after starting the/a procedure again.
What to do to make changes valid immediately?
Recompile within running code? (How?)
Wait for completion of change? (How?)
Thank you for ideas…
Bookmarks