LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Problem using UserForm in Macro

Hi Bob,

umm... it still doesn't work....

Terence
-----Original Message-----
Terence,

The form is being loaded before you populate the textbox.

Trying doing it
the other way around

Private Sub cmdButton_Click()
:
:
frmTest.txtbox1.Value = rst.Fields("testing")
frmTest.Show
End Sub


--

HTH

Bob Phillips

"Terence" wrote in message
...
Hi,

I am writing a macro with a button on the worksheet.

When
the button is clicked, the userform pops up and the data
of the recordset is displayed on the textbox of the

form.

e.g.

Private Sub cmdButton_Click()
:
:
frmTest.Show
frmTest.txtbox1.Value = rst.Fields("testing")
End Sub


However, the screen pops up but the textbox remains

empty.
Then I close the form and press the button again, the
screen pops up but this time the value is shown on the
textbox. Does anyone knows why?
Thanks a lot.

Terence



.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform Import problem Hedghog Excel Discussion (Misc queries) 0 June 2nd 10 01:57 PM
Userform problem? law Excel Discussion (Misc queries) 0 December 3rd 07 07:54 PM
userform problem TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 August 10th 06 04:43 AM
Problem using UserForm in Macro Bill Lunney Excel Programming 0 August 8th 03 08:54 AM
Chart into Userform Problem David Adamson[_2_] Excel Programming 7 August 3rd 03 03:30 AM


All times are GMT +1. The time now is 06:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"