Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default A newbie question Forms - Input and Output from an Excel Worksheet

I need to use a simple form to input data. The data input goes on to
do some calculations.I would like the resulting calculations to appear
on the form.

For example:

Data input in Form: Cost of Handset: $300, Margin: 50%, Lease period:
3 years.

Calculations ( either in form or in worksheet):
1.Selling Price = Cost *(1+margin)
2.Lease Cost = PMT(7%,Lease Period*12,-Selling Price)

Information required as output on Form: Lease Cost

I did try a couple of books like the Walkenbach one but could not find
how to send the information back from the wroksheet to the form.

Also, how do I disable users form scrolling off the on-screen form.
Windows Freeze pane does not seem to work across computers. Moreover,
that is not covered by Protect Sheet or Protect Workbook.

Could some one please help me or point me to a link where I can find
the relevant information.

Thanks in advance,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default A newbie question Forms - Input and Output from an Excel Worksheet

2 Options

put 3 text boxes 2 labels and 1 command button on your form

Textbox1 =Cost of Handse
Textbox2=Margin (as whole number
Textbox3=Lease perio
Label1= Selling Pric
Label2= Lease Cos
CmdBtn1= Calculat

in the click event of CmdBtn1 put this

Private sub CmdBtn1_Click(
Label1.caption = CvLong(textbox1.text) *(1 + CvLong(textbox2.text/100)
Label2.caption = PMT(7,cvlong(textbox3.text)*12,-cvlong(label1.caption)) <= I just followed what u ha
End sub

OR You could also disregard the 3 textboxes and pull from the cells using
Private sub CmdBtn1_Click(
dim t1 as long, t2 as long, t3 as lntege
t1 = Range("A1"
t2= Range("A2"
t3= Range("A3"
Label1.caption = CvLong(t1) *(1 + CvLong(t2/100)
Label2.caption = PMT(7,cvlong(t3)*12,-cvlong(label1.caption)) <= I just followed what u ha
End sub

----- NewRipper wrote: ----

I need to use a simple form to input data. The data input goes on t
do some calculations.I would like the resulting calculations to appea
on the form

For example:

Data input in Form: Cost of Handset: $300, Margin: 50%, Lease period
3 years

Calculations ( either in form or in worksheet):
1.Selling Price = Cost *(1+margin
2.Lease Cost = PMT(7%,Lease Period*12,-Selling Price

Information required as output on Form: Lease Cos

I did try a couple of books like the Walkenbach one but could not fin
how to send the information back from the wroksheet to the form

Also, how do I disable users form scrolling off the on-screen form
Windows Freeze pane does not seem to work across computers. Moreover
that is not covered by Protect Sheet or Protect Workbook

Could some one please help me or point me to a link where I can fin
the relevant information

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default A newbie question Forms - Input and Output from an Excel Worksheet



----- chris wrote: ----

2 Options

put 3 text boxes 2 labels and 1 command button on your form

Textbox1 =Cost of Handse
Textbox2=Margin (as whole number
Textbox3=Lease perio
Label1= Selling Pric
Label2= Lease Cos
CmdBtn1= Calculat

in the click event of CmdBtn1 put this

Private sub CmdBtn1_Click(
Label1.caption = CvLong(textbox1.text) *(1 + CvLong(textbox2.text/100)
Label2.caption = PMT(7,cvlong(textbox3.text)*12,-cvlong(label1.caption)) <= I just followed what u ha
End sub

OR You could also disregard the 3 textboxes and pull from the cells using
Private sub CmdBtn1_Click(
dim t1 as long, t2 as long, t3 as lntege
t1 = Worksheets(ActiveSheet.Name).Range("A1"
t2 = Worksheets(ActiveSheet.Name).Range("A2"
t3 = Worksheets(ActiveSheet.Name).Range("A3"
Label1.caption = CvLong(t1) *(1 + CvLong(t2/100)
Label2.caption = PMT(7,cvlong(t3)*12,-cvlong(label1.caption)) <= I just followed what u ha
End sub

----- NewRipper wrote: ----

I need to use a simple form to input data. The data input goes on t
do some calculations.I would like the resulting calculations to appea
on the form

For example:

Data input in Form: Cost of Handset: $300, Margin: 50%, Lease period
3 years

Calculations ( either in form or in worksheet):
1.Selling Price = Cost *(1+margin
2.Lease Cost = PMT(7%,Lease Period*12,-Selling Price

Information required as output on Form: Lease Cos

I did try a couple of books like the Walkenbach one but could not fin
how to send the information back from the wroksheet to the form

Also, how do I disable users form scrolling off the on-screen form
Windows Freeze pane does not seem to work across computers. Moreover
that is not covered by Protect Sheet or Protect Workbook

Could some one please help me or point me to a link where I can fin
the relevant information

Thanks in advance

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
compare excel worksheet and output difference to new worksheet Deb Excel Discussion (Misc queries) 1 October 31st 08 02:26 PM
Newbie question re Worksheet Name Jason[_3_] Excel Discussion (Misc queries) 2 May 2nd 07 04:46 PM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
Multiple input and output results smoothie Excel Discussion (Misc queries) 0 June 12th 06 05:58 PM
Excel VBA- Get user input, search the for match, output to text file gnileo Excel Programming 1 January 8th 04 07:59 PM


All times are GMT +1. The time now is 02:14 PM.

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

About Us

"It's about Microsoft Excel"