buzz71023

Active Member
Joined
May 29, 2011
Messages
282
i have a sequence of userforms used to input various codes into field. That all work great and go from flawlessly, until lately. I added vbmodeless to make cells selectable on one of the forms (everything still worked great. I then added a hyperlink to that same userform (opens up a different spreadsheet for ref.) Now when I go from one userform to the one that has the hyperlink (and vbmodeless) I have to select the userform/textbox with the mouse (its lookslike something else is selected) where i didnt have to do that before.

Hopefully this is explained well enough.

(this is just to show how the one before ".show"s)
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Sheets("Data Sheet").Select
Range("Letdown").Value = TextBox1.Value
Application.ScreenUpdating = True
Unload Me
FTIRThickness.Show vbModeless
End Sub

(this is the one i am trouble with)
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Windows("Quality Control Data Sheet (BETA).xls").Activate
Sheets("Data Sheet").Select
Range("FTIRThickness").Value = TextBox1.Value
Application.ScreenUpdating = True
Unload Me
Packaging.Show
End Sub
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

diddi

Well-known Member
Joined
May 20, 2004
Messages
3,337
Office Version
  1. 2010
Platform
  1. Windows
you could add a _activate event to the userform and use .setfocus to reposition your focus back to the required textbox, which must be getting lost somehow.
 

buzz71023

Active Member
Joined
May 29, 2011
Messages
282
Thanks for the advice, I'll try it tomorrow at work. My code is indented on my vbe but when I copied and pasted it onto the forum I just sent it. I wish I could box it in but have no idea how or if I can
 

GTO

MrExcel MVP
Joined
Dec 9, 2008
Messages
6,154
Add tags to your code like:
[code=rich]
'your code here
[/code]
 
Last edited:
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,589
Messages
5,765,313
Members
425,272
Latest member
Umba

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
Top