Hi, I'm using w11 & excel 2016 64 bit.
Anyone had problems writing vb code, saving it and when coming back to it isn't there please.
Lisa
vanishing vba
-
- Administrator
- Posts: 79365
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: vanishing vba
Did you save the workbook as .xlsx instead of as .xlsm or .xlsb?
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 964
- Joined: 08 Nov 2012, 17:54
Re: vanishing vba
Nope. Tried numerous times now.
Lisa.
Lisa.
-
- Administrator
- Posts: 79365
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: vanishing vba
Please try the following experiment:
- Create a workbook and save it as a macro-enabled workbook (.xlsm).
- Activate the Visual Basic Editor.
- Insert a module and create some code, for example
- You should still see the code in the module window.
- In addition, you can see the module in the Project Explorer pane on the left.
- Now save the workbook from the Visual Basic Editor (press Ctrl+S or click the Save button on the Standard toolbar or select File > Save).
- Does the module disappear? If not, does the code disappear from the module window?
- Create a workbook and save it as a macro-enabled workbook (.xlsm).
- Activate the Visual Basic Editor.
- Insert a module and create some code, for example
Code: Select all
Sub Test()
Beep
End Sub
- In addition, you can see the module in the Project Explorer pane on the left.
- Now save the workbook from the Visual Basic Editor (press Ctrl+S or click the Save button on the Standard toolbar or select File > Save).
- Does the module disappear? If not, does the code disappear from the module window?
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 613
- Joined: 14 Nov 2012, 16:06
Re: vanishing vba
Is the directory where you save this file a 'trusted location' ? (Trust center wise)
-
- 5StarLounger
- Posts: 964
- Joined: 08 Nov 2012, 17:54
Re: vanishing vba
Ok, I'll bite.
How do I tell if a folder is special?
Lisa
How do I tell if a folder is special?
Lisa
-
- 5StarLounger
- Posts: 611
- Joined: 27 Jun 2021, 10:46
Re: vanishing vba
File > Options > Trust Center > Trust Center Settings > Trusted Locations
-
- 5StarLounger
- Posts: 964
- Joined: 08 Nov 2012, 17:54
Re: vanishing vba
Hey Speakeasy,
Thanks for replying. Is this possible using VBA do you know??
Thanks for replying. Is this possible using VBA do you know??
-
- 5StarLounger
- Posts: 613
- Joined: 14 Nov 2012, 16:06
Re: vanishing vba
Luckily not, since in that case the Trust Center would be useless.
-
- 5StarLounger
- Posts: 964
- Joined: 08 Nov 2012, 17:54
Re: vanishing vba
Ahhhhh yes. I got this when I thought about it.
Lisa
Lisa
-
- 5StarLounger
- Posts: 964
- Joined: 08 Nov 2012, 17:54
Re: vanishing vba
Still looking at this.
Lisa
Lisa