Problem with autostart workbook

Sacruzsa

New Member
Joined
Feb 28, 2022
Messages
29
Office Version
  1. 2019
Platform
  1. Windows
Hello everyone,

I have a problem with a form that I wrote in excel. Normally the form starts when opening the file, but when the program is closed and I open it again 1min later, the form does not start automatically anymore, then excel opens with I have to use the button I initially created to use the start the form back , the weird thing is that when you close it again and reopen it the form starts automatically
I've been working on this for over a week now and can't find a solution for this, my first thought was because the file is on a ShP server but if I save it locally, the problem persists

I used the following code in 'ThisWorkbook'
Private sub workbook_open()
Application.visable = False
frm_Address_Book.show
End sub

Anyone have an idea where the error is?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
This is probably not your issue, but when this kind of thing happened to me in the past, it was because I was using lines of code that typically speed up Excel. Specifically,
VBA Code:
Application.EnableEvents = False
When Excel is restarted, this is changed to True, but if you would forget to have one of the subroutines not also execute:
VBA Code:
Application.EnableEvents = True
(with EVERY venue for which the subroutine can possibly terminate), there is a chance there is a "leak".

But that is just one possibility, of course.
 
Upvote 0
Hi cmowla,

When I use your solution, excel opens every time, that's just what I don't want 😁
The intention is that only the form appears and not Excel, for this I have provided a button that is protected
 
Upvote 0
I found the solution , apparently the excel did not close correctly and kept running somewhere in the background , I added a terminate code at the end and now it works perfectly
 
Upvote 0
Solution

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top