Hi there,
I can find lots of examples of closing a workbook after a period of inactivity but I can't find out how to run a macro.
Please help if possible, thank you
Hatrickx
Hi there,
I can find lots of examples of closing a workbook after a period of inactivity but I can't find out how to run a macro.
Please help if possible, thank you
Hatrickx
To Add Excel VBA Code to a Workbook / This Workbook Module
- Copy the code that you want to use
- Select the workbook in which you want to store the code
- Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
- In the Project Explorer, find your workbook, and open the list of Microsoft Excel Objects
- Right-click on the ThisWorkbook object, and choose View Code
- Where the cursor is flashing, choose Edit | Paste
Please Login or Register to view this content.
If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
Mark your thread as Solved
If the suggestion helps you, then Click *below to Add Reputation
Ah yes I see what you are thinking I'm thinking!
But what I have is a userform which I need to run a private sub whenever the user hasn't interacted with the userform for a certain amount of time. And without actually shutting the workbook itself as the userform must endure this process and be available to interact with at all times if possible.
I wonder if this could be achievable?
So imagine a userform with commandbuttons and a black background.
All I need is for the background to go red if no one has clicked any of the commandbuttons for 10 seconds.
If it gets to between >0 & <10 seconds and a commandbutton is clicked then the count goes back to zero and the background stays black for now.
I have a grasp of running timers but I can't get this to work...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks