Apr 02 2023 08:46 AM
The VBA code in my Safety Inspection worksheet is referencing a worksheet named "Training". But that sheet doesn't exist in the workbook. I have already made sure that there are no hidden pages. I know that this code is referencing this workbook since the code includes "ActiveWorkbook"
Does anyone have any suggestions on how to fix this or why it might be happening?
Apr 02 2023 11:11 AM
Does the copy_name macro get called elsewhere in the code? If not, you can delete or comment out this macro.
Apr 02 2023 11:14 AM
@LilYawney You say "there are no hidden pages" but how did you check? There is a property/option for "VeryHidden" meaning on the workbook if you right click on the sheet tabs to 'unhide' it isn't there.
Since you are in VBA, did you check the project explorer (ctrl-R if it isn't open) as shown on the left in this image? Or Type in the Immediate window (ctrl-g) as shown in the image to check for the status (i.e. a 2 = VeryHidden
Apr 02 2023 12:11 PM
Apr 02 2023 12:47 PM
The workbook that you attached to your other recent discussion does not contain a worksheet Training, indeed. I'd remove the entire Module1 - the code in this module is not called in any other module.