UserForm vbModeless issue

SQUIDD

Well-known Member
Joined
Jan 2, 2009
Messages
2,126
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Good Evening.

So, I have a userform called JOB_FINANCIALS
When i click an image on another userform(JOB_INFO), JOB_FINANCIALS loads on the screen.
on UserForm_Activate it performs a series of calculations from both the sheet and previous user form and displays the results in various textboxes.

However, i have a save button on the previous userform(JOB_INFO), this saves info to a central database.
But i need those calcualations as well as other info to save.

My thought process was

JOB_FINANCIALS.show vbModeless
grab the data and store it as temp variables
Unload JOB_FINANCIALS
use the saved variables when i hit save.

Problem is, the data does not arrive in the user form when i use JOB_FINANCIALS.show vbModeless, only if i use JOB_FINANCIALS.show

but i cannot execute any code until i close the userform using JOB_FINANCIALS.show, and by then the data has gone lol

i do not want a 2 step saving process.

I'm stumped

thanks for reading, hope you understand

Dave
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi All

Yeah, so i had a bit of a stupid moment here.

I have just stored the variables on the userform_terminate

VBA Code:
[CODE=vba]
JOB_FINANCIALS.show vbModeless
DoEvents
Unload JOB_FINANCIALS

VBA Code:
Private Sub UserForm_Terminate()
MsgBox Me.TOTAL_QUOTE
End Sub
[/CODE]

so that sorts it out

thanks

Dave
 
Upvote 0
Solution

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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