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: 273
Default Code Still Does Not Work

Greetings,

I am trying to pass data from one UserForm to another and then hide
the first one. So far, I can get UserForm2 (UF2) to come up, but
UserForm1(UF1) doesn't hide until I cancel out of UF2. Then I must
use the button on the sheet that originally brought up UF1 to unhide
it. For some reason, the code that I use to bring up UF2 does not
finish running!!! I tried to do UF1.Show in the Cancel button on UF2
and I got an error that said I could not show what is not hidden(?).
So I removed it.

I then put MsgBoxes between each line to track what was happening.
It gets past the 1st MsgBox to open UF2 and no further, until I close
out UF2, then the rest of the Msg's pop up. This is also when UF1
gets hidden as the code progresses!!!!

Here is the code:

Private Sub CalculateButton_Click()

MsgBox "Bring up UF2"
UF2.Show
MsgBox "Hide UF1"
UF1.Hide
MsgBox "Copy the 1st amount"
UF2.T1.Text = UF1.TB16.Text
MsgBox "Copy the 2nd amount"
UF2.T2.Text = UF1.TB8.Text
MsgBox "Copy the 3rd amount"
UF2.T3.Text = UF1.TB7.Text
MsgBox "Copy the 4th amount"
UF2.T4.Text = Val(UF1.TB11.Text)
MsgBox "Copy the 5th amount"
UF2.T5.Text = UF1.TB9.Text
MsgBox "Copy the 6th amount"
UF2.T6.Text = UF1.TB13.Text
MsgBox "Copy the 7th amount"
UF2.T7.Text = UF1.TB15.Text
MsgBox "Copy the 8th amount"
UF2.T8.Text = UF1.TB10.Text
MsgBox "Copy the 9th amount"
UF2.T9.Text = UF1.TB12.Text
MsgBox "Copy the 10th amount"
UF2.T10.Text = UF1.TB14.Text
End Sub

Any help would be appreciated.

TIA

-Minitman
 
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
Why this code is not work? Error code when select worksheet Excel Worksheet Functions 4 December 4th 07 12:51 AM
Help getting code to work. Frank Stone Excel Programming 1 July 28th 04 10:01 PM
Why my code do not work : - ( keepitcool Excel Programming 5 September 5th 03 06:28 PM
Why my code do not work : - ( Tom Ogilvy Excel Programming 1 August 31st 03 04:53 PM
Why my code do not work : - ( Bob Phillips[_5_] Excel Programming 0 August 31st 03 01:27 PM


All times are GMT +1. The time now is 01:05 AM.

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

About Us

"It's about Microsoft Excel"