I have a template with macros to validate the data on clicking the button. The template having only one sheet and no sheets added in that file (It should have one sheet only). Now, I have to do is, when the file is open without macros enabled, i need to display a image, please enable macros other wise no need to display.
Thanks a lot in advance for any help.
The answer to your question is “You Can’t“
However here is an alternative by Ken Puls which will suit your purpose just fine.
Topic: Force users to enable macros in a workbook
Link: http://www.vbaexpress.com/kb/getarticle.php?kb_id=379
QUOTE FROM THAT LINK
FOLLOWUP
Before you close the Workbook do the following
And when you open do the reverse of above
Important.
When you place the picture on the sheet, right click on the picture and click on ‘Format Picture’. In the
Format Picture Dialog, selectDon't move or size with cellsand uncheck the option which saysPrint ObjectCODE WHEN CLOSING THE WORKBOOK – Apply the same concept as shown in the above link
CODE WHEN OPENING THE WORKBOOK – Apply the same concept as shown in the above link
NOTE: In the above code, replace
"Sheet1"with the relevant sheet name and replace"Picture 1"with the relevant picture name. I am showing the image in CellA1. You can amend that to display the picture where ever you want by adjusting.Topand.Leftof the Shape.SNAPSHOT IF MACRO IS DISABLED