Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link from Userform to Spreadsheet
I aheva userform to calculate a project total depending on
the options picked using drop down boxes and checkboxes. This all results in a sheet called "Summary" which lists the components of the project and gives a total in cell D38. I want this total to be displayed on the userform, AS the user is picking the options. i have a text box to show this value, and thought i could just add a command button next to it, with the following code: TextBox45.ControlSource = "summary!D38" This way i could just click on the button at any point and see what the total was up to. what this does, however, is overwrites the subtotal formula in cell D38. So, two questions: 1- can i get the textbox to just look up the value in D38, not replace it? All help appreciated Richard 2- can i get the textbox to update as i change the various options? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link from Userform to Spreadsheet
use
Private Sub CommandButton1_Click() TextBox45.Text = Sheets("summary").Range("D38").Value End Sub Richard wrote: I aheva userform to calculate a project total depending on the options picked using drop down boxes and checkboxes. This all results in a sheet called "Summary" which lists the components of the project and gives a total in cell D38. I want this total to be displayed on the userform, AS the user is picking the options. i have a text box to show this value, and thought i could just add a command button next to it, with the following code: TextBox45.ControlSource = "summary!D38" This way i could just click on the button at any point and see what the total was up to. what this does, however, is overwrites the subtotal formula in cell D38. So, two questions: 1- can i get the textbox to just look up the value in D38, not replace it? All help appreciated Richard 2- can i get the textbox to update as i change the various options? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link from Userform to Spreadsheet
Thanks, but this code still overwrites my cell D38. Is
there any way of not overwriting it, or resetting the subtotal formula once the button hasbeen clicked? -----Original Message----- use Private Sub CommandButton1_Click() TextBox45.Text = Sheets("summary").Range("D38").Value End Sub Richard wrote: I aheva userform to calculate a project total depending on the options picked using drop down boxes and checkboxes. This all results in a sheet called "Summary" which lists the components of the project and gives a total in cell D38. I want this total to be displayed on the userform, AS the user is picking the options. i have a text box to show this value, and thought i could just add a command button next to it, with the following code: TextBox45.ControlSource = "summary!D38" This way i could just click on the button at any point and see what the total was up to. what this does, however, is overwrites the subtotal formula in cell D38. So, two questions: 1- can i get the textbox to just look up the value in D38, not replace it? All help appreciated Richard 2- can i get the textbox to update as i change the various options? . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Link from Userform to Spreadsheet
don't link the textbox to cell D38.
-- Regards, Tom Ogilvy "Richard" wrote in message ... Thanks, but this code still overwrites my cell D38. Is there any way of not overwriting it, or resetting the subtotal formula once the button hasbeen clicked? -----Original Message----- use Private Sub CommandButton1_Click() TextBox45.Text = Sheets("summary").Range("D38").Value End Sub Richard wrote: I aheva userform to calculate a project total depending on the options picked using drop down boxes and checkboxes. This all results in a sheet called "Summary" which lists the components of the project and gives a total in cell D38. I want this total to be displayed on the userform, AS the user is picking the options. i have a text box to show this value, and thought i could just add a command button next to it, with the following code: TextBox45.ControlSource = "summary!D38" This way i could just click on the button at any point and see what the total was up to. what this does, however, is overwrites the subtotal formula in cell D38. So, two questions: 1- can i get the textbox to just look up the value in D38, not replace it? All help appreciated Richard 2- can i get the textbox to update as i change the various options? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
link a local spreadsheet to a network shared spreadsheet | Setting up and Configuration of Excel | |||
Userform w/ Multiple listboxes that link | Excel Programming | |||
Userform w/ Multiple listboxes that link | Excel Programming | |||
how do I link Textboxes in a userform to a Cell in a Worksheet? | Excel Programming | |||
spreadsheet on userform | Excel Programming |