ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   assistance with code completion (https://www.excelbanter.com/excel-programming/339150-assistance-code-completion.html)

Jim May

assistance with code completion
 
When I run:

Sub RunMyForm()
Load UserForm1
UserForm1.Show
End Sub

Private Sub UserForm_Initialize()
txtCurrTotal.Text =
Format(Application.Sum(Worksheets("Sheet1").Range( "B3:C6")), "$0,000.00")
End Sub

$3,996.00 appears in the textbox, JUSTing hanging there..
With cursor within the Textbox (having not exited).

How can I get it to proceed with say a message that says,,
Is this OK? Yes No

TIA,



Norman Jones

assistance with code completion
 
Hi Jim,

Try:

Sub RunMyForm()
Load UserForm1
UserForm1.Show False
MsgBox "OK to continue?", Buttons:=vbYesNo

End Sub

---
Regards,
Norman



"Jim May" wrote in message
news:92tSe.17667$8q.16455@lakeread01...
When I run:

Sub RunMyForm()
Load UserForm1
UserForm1.Show
End Sub

Private Sub UserForm_Initialize()
txtCurrTotal.Text =
Format(Application.Sum(Worksheets("Sheet1").Range( "B3:C6")), "$0,000.00")
End Sub

$3,996.00 appears in the textbox, JUSTing hanging there..
With cursor within the Textbox (having not exited).

How can I get it to proceed with say a message that says,,
Is this OK? Yes No

TIA,





Jim May

assistance with code completion
 
Norman thanks;
So the False statement (making the form modeless) allows the code to
proceed, right?
Is there a simple way to move the Msgbox "over" to the right, a couple of
inches (now it is centered OVER my form covering the textbox data
($3,996.00)?
TIA,
Jim

"Norman Jones" wrote in message
...
Hi Jim,

Try:

Sub RunMyForm()
Load UserForm1
UserForm1.Show False
MsgBox "OK to continue?", Buttons:=vbYesNo

End Sub

---
Regards,
Norman



"Jim May" wrote in message
news:92tSe.17667$8q.16455@lakeread01...
When I run:

Sub RunMyForm()
Load UserForm1
UserForm1.Show
End Sub

Private Sub UserForm_Initialize()
txtCurrTotal.Text =
Format(Application.Sum(Worksheets("Sheet1").Range( "B3:C6")), "$0,000.00")
End Sub

$3,996.00 appears in the textbox, JUSTing hanging there..
With cursor within the Textbox (having not exited).

How can I get it to proceed with say a message that says,,
Is this OK? Yes No

TIA,







Norman Jones

assistance with code completion
 
Hi Jim,

You could move the userform by using its Top and Left properties, e.g.:

Sub RunMyForm()
With UserForm1
.StartUpPosition = 3
.Left = .Left + 100
.Top = .Top + 100
Load UserForm1
.Show False
End With
MsgBox "OK to continue?", Buttons:=vbYesNo
End Sub


---
Regards,
Norman



"Jim May" wrote in message
news:IKASe.18218$8q.9207@lakeread01...
Norman thanks;
So the False statement (making the form modeless) allows the code to
proceed, right?
Is there a simple way to move the Msgbox "over" to the right, a couple of
inches (now it is centered OVER my form covering the textbox data
($3,996.00)?
TIA,
Jim

"Norman Jones" wrote in message
...
Hi Jim,

Try:

Sub RunMyForm()
Load UserForm1
UserForm1.Show False
MsgBox "OK to continue?", Buttons:=vbYesNo

End Sub

---
Regards,
Norman



"Jim May" wrote in message
news:92tSe.17667$8q.16455@lakeread01...
When I run:

Sub RunMyForm()
Load UserForm1
UserForm1.Show
End Sub

Private Sub UserForm_Initialize()
txtCurrTotal.Text =
Format(Application.Sum(Worksheets("Sheet1").Range( "B3:C6")),
"$0,000.00")
End Sub

$3,996.00 appears in the textbox, JUSTing hanging there..
With cursor within the Textbox (having not exited).

How can I get it to proceed with say a message that says,,
Is this OK? Yes No

TIA,









Jim May

assistance with code completion
 
Thanks again Norman.

"Norman Jones" wrote in message
...
Hi Jim,

You could move the userform by using its Top and Left properties, e.g.:

Sub RunMyForm()
With UserForm1
.StartUpPosition = 3
.Left = .Left + 100
.Top = .Top + 100
Load UserForm1
.Show False
End With
MsgBox "OK to continue?", Buttons:=vbYesNo
End Sub


---
Regards,
Norman



"Jim May" wrote in message
news:IKASe.18218$8q.9207@lakeread01...
Norman thanks;
So the False statement (making the form modeless) allows the code to
proceed, right?
Is there a simple way to move the Msgbox "over" to the right, a couple of
inches (now it is centered OVER my form covering the textbox data
($3,996.00)?
TIA,
Jim

"Norman Jones" wrote in message
...
Hi Jim,

Try:

Sub RunMyForm()
Load UserForm1
UserForm1.Show False
MsgBox "OK to continue?", Buttons:=vbYesNo

End Sub

---
Regards,
Norman



"Jim May" wrote in message
news:92tSe.17667$8q.16455@lakeread01...
When I run:

Sub RunMyForm()
Load UserForm1
UserForm1.Show
End Sub

Private Sub UserForm_Initialize()
txtCurrTotal.Text =
Format(Application.Sum(Worksheets("Sheet1").Range( "B3:C6")),
"$0,000.00")
End Sub

$3,996.00 appears in the textbox, JUSTing hanging there..
With cursor within the Textbox (having not exited).

How can I get it to proceed with say a message that says,,
Is this OK? Yes No

TIA,












All times are GMT +1. The time now is 09:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com