PDA

View Full Version : Userforms Disappear, Userforms can't save



ScotWW
09-03-2017, 08:21 PM
I can't save userforms on word.

I have a version of a macro file with a userform that is almost complete and working fairly well.

When I try save as from my stable file, the "Forms" directory in the vba editor disappears.
When I copy the stable file in windows explorer, the forms directory in the vba editor disappears.
WHen I export the userform to file and import the usrform to a new macro, the userform comes in, runs fine. I save the file, but userforms disappear upon reopen
When I copy the stable file to google drive, then download it, userform disappears.

Could anyone please advise how I can copy my stable file and apply sensible version control? I want my userforms back!

I read somewhere that word macros are saved in normal.dotm. I don't understand why this would be possible if I can share a macro via email or via zip drive between computers.

Thanks for your help.

Dragged the file that Works to the attachments.

for full functionality, create a folder in the same folder the macro rests with the name "Trade Specific". Inside this folder, insert any old .docx documents.

macropod
09-03-2017, 09:01 PM
Have you tried repairing the Office installation (via Windows Control Panel > Programs > Programs & Features > Microsoft Office (version) > Change > Repair)?

Have you checked your Word Trust Center settings?

gmayor
09-03-2017, 10:26 PM
Macros are stored in templates and macro enabled documents. By default they are stored in the normal template. Your document has a userform but no supplementary macros. Your document should be a macro enabled template and you should create new documents from it. The new document will be unnamed and you will not have to reset it, which would provide infinite scope for saving over required data.

There is no need to set references to the Word Application as you are running the userform in Word. There is also going to be some confusion about ThisDocument vis-vis ActiveDocument. ThisDocument is the template with the macros. ActiveDocument is the document created from the template.

As for the VBA issues, as Paul suggested, repair Office then reboot the PC before trying again, though I suspect that the problem has more to do with the process that your userform attempts (which cannot be checked as we don't have the supplementary document). If you start with a template there will be no need to attempt to move the userform. it is already in the template and the documents you create will access it.

ScotWW
09-13-2017, 04:18 AM
Thank you. It was something simple in the end. I believe it was that I had not enabled macros! Silly mistake.