Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default show userform/hide workbook

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default show userform/hide workbook

On 19 Jan., 12:19, pswanie wrote:
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default show userform/hide workbook

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?


"Per Jessen" wrote:

On 19 Jan., 12:19, pswanie wrote:
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default show userform/hide workbook

On 19 Jan., 14:44, pswanie wrote:
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?



"Per Jessen" wrote:
On 19 Jan., 12:19, pswanie wrote:
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- Skjul tekst i anførselstegn -


- 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default show userform/hide workbook

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

"Per Jessen" wrote:

On 19 Jan., 14:44, pswanie wrote:
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?



"Per Jessen" wrote:
On 19 Jan., 12:19, pswanie wrote:
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- Skjul tekst i anførselstegn -


- 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default show userform/hide workbook

On 19 Jan., 15:19, pswanie wrote:
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



"Per Jessen" wrote:
On 19 Jan., 14:44, pswanie wrote:
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?


"Per Jessen" wrote:
On 19 Jan., 12:19, pswanie wrote:
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- Skjul tekst i anførselstegn -


- 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- Skjul tekst i anførselstegn -


- 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
Reply
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 show / hide problem brookly Excel Programming 6 March 18th 06 09:48 PM
Show/Hide Userform erases global vriables Dave D-C[_3_] Excel Programming 3 December 15th 05 12:08 AM
Userform Question (Load/Unload/Show/Hide) RPIJG[_76_] Excel Programming 8 November 2nd 05 08:29 PM
How to show/hide sections of a userform? madbloke[_17_] Excel Programming 2 October 6th 04 03:53 PM
Userform.hide / show papou[_7_] Excel Programming 0 September 15th 03 03:12 PM


All times are GMT +1. The time now is 08:56 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"