Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Further simple Form questions

1 form containing 1 frame. Within the frame are labels and textboxes, with
the idea that labels are fixed, and users simply enter their data in the
adjacent textboxes.

So far I have no code, but I will show the form via an addin's menu.

Q1: how do I return the user from the form (ie back to the addin)?
Q2: how does the user save the form?
Q3: how does the user print the form?

Any help would be much appreciated.

Regards.




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Further simple Form questions

Private Sub CommandButton1_click()
Userform1.PrintForm
unload me
End Sub


write the data somewhere. You don't save the userform.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
1 form containing 1 frame. Within the frame are labels and textboxes, with
the idea that labels are fixed, and users simply enter their data in the
adjacent textboxes.

So far I have no code, but I will show the form via an addin's menu.

Q1: how do I return the user from the form (ie back to the addin)?
Q2: how does the user save the form?
Q3: how does the user print the form?

Any help would be much appreciated.

Regards.






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Further simple Form questions

If you mean that you want to preserve whatever was on the form when you say
save it, then you will have to save all of the textbox, combobox values etc
onto a worksheet in the addin, and next time the form is shown, then you
load the form from that worksheet data.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuart" wrote in message
...
1 form containing 1 frame. Within the frame are labels and textboxes, with
the idea that labels are fixed, and users simply enter their data in the
adjacent textboxes.

So far I have no code, but I will show the form via an addin's menu.

Q1: how do I return the user from the form (ie back to the addin)?
Q2: how does the user save the form?
Q3: how does the user print the form?

Any help would be much appreciated.

Regards.






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Further simple Form questions

Many thanks for the reply.

So I have to place a 'Print' button on the Form for the
user to click? Will this show up in the print?

Regards.

"Tom Ogilvy" wrote in message
...
Private Sub CommandButton1_click()
Userform1.PrintForm
unload me
End Sub


write the data somewhere. You don't save the userform.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
1 form containing 1 frame. Within the frame are labels and textboxes,
with
the idea that labels are fixed, and users simply enter their data in the
adjacent textboxes.

So far I have no code, but I will show the form via an addin's menu.

Q1: how do I return the user from the form (ie back to the addin)?
Q2: how does the user save the form?
Q3: how does the user print the form?

Any help would be much appreciated.

Regards.








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Further simple Form questions

Many thanks for the reply, but I don't understand how to achieve that.

Regards.

"Bob Phillips" wrote in message
...
If you mean that you want to preserve whatever was on the form when you
say
save it, then you will have to save all of the textbox, combobox values
etc
onto a worksheet in the addin, and next time the form is shown, then you
load the form from that worksheet data.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuart" wrote in message
...
1 form containing 1 frame. Within the frame are labels and textboxes,
with
the idea that labels are fixed, and users simply enter their data in the
adjacent textboxes.

So far I have no code, but I will show the form via an addin's menu.

Q1: how do I return the user from the form (ie back to the addin)?
Q2: how does the user save the form?
Q3: how does the user print the form?

Any help would be much appreciated.

Regards.










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Further simple Form questions

In the Userform_Terminate event add code like

With ThisWorkbook.Worksheets("SaveForm")
.Range("A1").Value = Me.Textbox1.Value
.Range("A2").Value = Me.ComboBox1.Value
'etc.
End With

You will have to adapt to all the controls that you wsih to save, I can't
possibly know all of that.

To reload, just do the opposite in the Userform_Initilaize event

With ThisWorkbook.Worksheets("SaveForm")
Me.Textbox1.Value = .Range("A1").Value
Me.ComboBox1.Value = .Range("A2").Value
'etc.
End With

One thing to be aware of is that loading the form in the initialize event
like this can trigger control event code.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuart" wrote in message
...
Many thanks for the reply, but I don't understand how to achieve that.

Regards.

"Bob Phillips" wrote in message
...
If you mean that you want to preserve whatever was on the form when you
say
save it, then you will have to save all of the textbox, combobox values
etc
onto a worksheet in the addin, and next time the form is shown, then you
load the form from that worksheet data.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuart" wrote in message
...
1 form containing 1 frame. Within the frame are labels and textboxes,
with
the idea that labels are fixed, and users simply enter their data in

the
adjacent textboxes.

So far I have no code, but I will show the form via an addin's menu.

Q1: how do I return the user from the form (ie back to the addin)?
Q2: how does the user save the form?
Q3: how does the user print the form?

Any help would be much appreciated.

Regards.










  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Further simple Form questions

Normally it would, but you could try

Private Sub Print_Click()
Me.Print.Visible = False
Userform1.PrintForm
unload me
End Sub

If you don't want to unload the form after printing, just change that to

Me.Print.Visible = True

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuart" wrote in message
...
Many thanks for the reply.

So I have to place a 'Print' button on the Form for the
user to click? Will this show up in the print?

Regards.

"Tom Ogilvy" wrote in message
...
Private Sub CommandButton1_click()
Userform1.PrintForm
unload me
End Sub


write the data somewhere. You don't save the userform.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
1 form containing 1 frame. Within the frame are labels and textboxes,
with
the idea that labels are fixed, and users simply enter their data in

the
adjacent textboxes.

So far I have no code, but I will show the form via an addin's menu.

Q1: how do I return the user from the form (ie back to the addin)?
Q2: how does the user save the form?
Q3: how does the user print the form?

Any help would be much appreciated.

Regards.










  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Further simple Form questions

Will give it a try.
Many thanks

Regards.

"Bob Phillips" wrote in message
...
Normally it would, but you could try

Private Sub Print_Click()
Me.Print.Visible = False
Userform1.PrintForm
unload me
End Sub

If you don't want to unload the form after printing, just change that to

Me.Print.Visible = True

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuart" wrote in message
...
Many thanks for the reply.

So I have to place a 'Print' button on the Form for the
user to click? Will this show up in the print?

Regards.

"Tom Ogilvy" wrote in message
...
Private Sub CommandButton1_click()
Userform1.PrintForm
unload me
End Sub


write the data somewhere. You don't save the userform.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
1 form containing 1 frame. Within the frame are labels and textboxes,
with
the idea that labels are fixed, and users simply enter their data in

the
adjacent textboxes.

So far I have no code, but I will show the form via an addin's menu.

Q1: how do I return the user from the form (ie back to the addin)?
Q2: how does the user save the form?
Q3: how does the user print the form?

Any help would be much appreciated.

Regards.












  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Further simple Form questions

Thanks for that.
Will post anew if need be.

Thanks to you both.

Regards.

"Bob Phillips" wrote in message
...
In the Userform_Terminate event add code like

With ThisWorkbook.Worksheets("SaveForm")
.Range("A1").Value = Me.Textbox1.Value
.Range("A2").Value = Me.ComboBox1.Value
'etc.
End With

You will have to adapt to all the controls that you wsih to save, I can't
possibly know all of that.

To reload, just do the opposite in the Userform_Initilaize event

With ThisWorkbook.Worksheets("SaveForm")
Me.Textbox1.Value = .Range("A1").Value
Me.ComboBox1.Value = .Range("A2").Value
'etc.
End With

One thing to be aware of is that loading the form in the initialize event
like this can trigger control event code.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuart" wrote in message
...
Many thanks for the reply, but I don't understand how to achieve that.

Regards.

"Bob Phillips" wrote in message
...
If you mean that you want to preserve whatever was on the form when you
say
save it, then you will have to save all of the textbox, combobox values
etc
onto a worksheet in the addin, and next time the form is shown, then
you
load the form from that worksheet data.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuart" wrote in message
...
1 form containing 1 frame. Within the frame are labels and textboxes,
with
the idea that labels are fixed, and users simply enter their data in

the
adjacent textboxes.

So far I have no code, but I will show the form via an addin's menu.

Q1: how do I return the user from the form (ie back to the addin)?
Q2: how does the user save the form?
Q3: how does the user print the form?

Any help would be much appreciated.

Regards.












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
Questions should be simple please help babiigirl Excel Worksheet Functions 3 June 14th 06 07:24 PM
Simple questions (I hope) scrabtree23[_3_] Excel Programming 7 November 24th 04 06:25 AM
Simple Questions James[_17_] Excel Programming 3 December 7th 03 04:22 PM
Several simple questions Stuart[_5_] Excel Programming 1 September 14th 03 08:58 PM
Simple VB and Excel questions Kevin Excel Programming 1 August 5th 03 08:40 PM


All times are GMT +1. The time now is 12:19 PM.

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"