View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] halimnurikhwan@yahoo.com is offline
external usenet poster
 
Posts: 113
Default Info from User Form to Data sheet and back

hi Bafa,

Ok, just post your book ... and I will try to see and help!

example in event of textbox :
Private Sub textBox1_Change()
range("A1").value = textbox1.value
End Sub

that will change range A1 value too while textbox1 value changed

or you're using commandbutton to react the value
Private Sub CommandButton1_Click()
range("A1").value = textbox1.value
End Sub

it will change range A1 value after commandbutton1 clicked

Rgds,

Halim

Gary Keramidas menuliskan:
here's a simple explanation, to get you started. i am guessing you can insert a
userform and add a textbox and a command button.

in a blank workbook:

right click the userform in the editor and choose view code
the dropdown in the upper left will display userform
select activate in the dropdown on the right where it says click

in between the sub and end sub it creates copy this

Me.TextBox1.Value = Worksheets("sheet1").Range("a1").Value

view the userform again and double click the command button
enter this code between the sub and end sub

Worksheets("sheet1").Range("a1").Value = Me.TextBox1.Value


now run the form , type something in the text box and click save, it will appear
in A1 on sheet1
close the form and reopen it, the textbox will show the value of sheet1 a1

--


Gary


"Bafa" wrote in message
...

Info from User Form to Data sheet and back:

I have never built a User Form. It seems like the functions I need
are straight forward and simple, but they may not be as I am not
finding a tutorial on how to do it. Just this past year I learned how
to use =IF statements in my calculations in a standard worksheet. So
it's obvious I am still very new to this and only know what I know by
deconstructing other sheets to see how they work. That being said
please don't assume I know coding or anything beyoind the most basic.

I have almost completed a workbook for calculating data for a quality
assurance we run for our computerized tomography unit. It has 3 pages:
User Input which will be visable, and calculations page and Print Out
page which will both be invisible. The User Input page is raw and
rough looking in its table form and I am afraid it will scare off other
who don't feel comfortable in using it. I want to set up a user form so
they have a nice little window with input boxes and "next" and "back"
buttons to walk them through it all.

I don't know how to link input boxes to specific cells in my worksheet
so that the calculations can be performed. Also there will be some
calculations performed in my worksheet which I need to show up in my
User Form so my co worrker will know what values to set to perform the
next step in the test. I am planning quite a few windows with next and
back buttons so that I can take them through step by step. Once all
calculations have been completed I need them to print out using all the
info that was input throughough the entire process.

I have not completed my workbook yet, but if needed I could post a link
to my workbook so that anyone wiling to help me could get an idea of
what I am working towards and what exactly I need. Also after the end
of it all and the page is printed out I do not need to save any of the
info, since next week it will be all new info and calculations.

If this post in in the wrong spot feel free to move it. I tried to
read around to see where it fit best, but wasn't sure. Thanks for any
help.


--
Bafa
------------------------------------------------------------------------
Bafa's Profile:
http://www.excelforum.com/member.php...o&userid=37748
View this thread: http://www.excelforum.com/showthread...hreadid=573341