View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Corey Corey is offline
external usenet poster
 
Posts: 172
Default Pressing a CommandButton on a Userform via Code

Hmm.
Still a bit puzzled.

So how would I :
Using Commandbutton3 on Userform5 i copied the code that i normally use to
unload the uersorm data into a sheet.
i want to add at the end of this code the following:
Userform4.Show & use the value that was in Userform5.Textbox195 as the
selected value in Userform4.Combobox1.value,
then Press the CommandButton1 of Userform4(CommandButton1.Value = True),
then
this Button inputs data from the sheet that Userform5 also add data to,
thendisplays a 1 page sheet with the data placed in the relative cells in
Print Preview mode.

I am having trouble carrying the value from Userform5 through to Userform4,
and getting each of the Userforms no longer require to Close off correctly.

Any idea's of the most efective way to do this?

I tried copying ALL code into the CommandButton3 code on Userform5 but it
took forever and stalled at stages with errors.

Corey....



"Corey" wrote in message
...
I want to have a user click a Commandbutton on Userform5 that will Show
Userform8.
This is OK,
Userform8 has a CommandButton1 to View a Sheet in PrintPreview.
How can i get the Userform8 CommandButton to to Coded to Run to the
Preview with out having to press it ?


I tried:
Call Userform8.Commandbutton1 but get an error
also tried:

Call CommandButton1 but still get an error.

How can this be done?
Corey....