> how can i hide the workbook and show a userform? i got data that needs to
> show in combobox and labels and textboxes that need to enter data to the
> workbook.
> the code i got i can hide the workbook/application but then the data dont
> appear in my userform
Hi
With a userform containing a label, named "Label1" a textbox named
"Textbox1", a combobox named "ComboBox1", and a commandbutton named
"Commandbutton1"
Inset this code in the userforms codesheet. Run the userform with data
in range A1, B1:B3 and see what happens.
Private Sub CommandButton1_Click()
Range("C1") = Me.TextBox1.Value
Range("C2") = Me.ComboBox1.Object
End Sub
Private Sub UserForm_Initialize()
Me.Label1.Caption = Range("A1").Value
For c = 1 To 3
Me.ComboBox1.AddItem Cells(c, 2).Value ' Add values from B1:B3
Next
me.CommandButton1.Caption = "OK"
End Sub
// Per
pswanie - 19 Jan 2008 13:44 GMT
i do get everything to show that needs but only if i dont hide the worksheet.
and does not look like ur code will hide or not show my excell sheet?
> > how can i hide the workbook and show a userform? i got data that needs to
> > show in combobox and labels and textboxes that need to enter data to the
[quoted text clipped - 25 lines]
>
> // Per
Per Jessen - 19 Jan 2008 14:04 GMT
> i do get everything to show that needs but only if i dont hide the worksheet.
>
[quoted text clipped - 31 lines]
>
> - Vis tekst i anførselstegn -
Hi
As far as I know you can not hide your workbook. Why do you want to
hide it ? The user can not enter data into the workbook as the
userform is running.
// Per
pswanie - 19 Jan 2008 14:19 GMT
dont want the user to see it in the back...
or how will i get my userform the size of the screen to "block out" the
excell sheet?
dont need the user to know there is a excell sheet runing
> > i do get everything to show that needs but only if i dont hide the worksheet.
> >
[quoted text clipped - 39 lines]
>
> // Per
Per Jessen - 19 Jan 2008 14:49 GMT
> dont want the user to see it in the back...
> or how will i get my userform the size of the screen to "block out" the
[quoted text clipped - 47 lines]
>
> - Vis tekst i anførselstegn -
If you are running the userform from the same machine i.e. same screen
size you can just drag the userform to fit the whole screen.
Otherwise you will have to catch the screen size from the system, and
then resize the userform according to that, information. Unfortunately
I don't know how to catch the screen size.
Regards,
Per
pswanie - 19 Jan 2008 14:57 GMT
i run it on this and a few other machines. most the same size but not all of
them.
the other are smaller so my whole userform will not show then... i will
make it approximate i think...
thanx
> > dont want the user to see it in the back...
> > or how will i get my userform the size of the screen to "block out" the
[quoted text clipped - 58 lines]
>
> Per
pswanie - 19 Jan 2008 16:39 GMT
i searched and got this to work from a prev posting
Application.Visible = False
and then i got a command button to make it true if i need to get "into"
excell again
> i run it on this and a few other machines. most the same size but not all of
> them.
[quoted text clipped - 66 lines]
> >
> > Per