Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy text from cells into different textboxes
hi all,
I am a beginner concerning VBA scripting and I have following task: I have got a flowsheet diagram of a process drawn in Excel. Further, Excel calculates the single streams of the process (mass flows and concentrations). This data is written into several cells in the worksheet. What I want to do is to automatically update the values from the cells into textboxes that are attached to the flowsheet diagram. The problem I have is that I do not know how to address the existing textboxes with VBA. Could somebody give me a hint? Thanks, Luca |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy text from cells into different textboxes
Assuming the TextBox is from the Control ToolBox. As an example:
Sheets(1).TextBox1.Text = Sheets(1).Range("A1").Value Would place the data in Cell A1 into TextBox 1. "JazzyXXL" wrote: hi all, I am a beginner concerning VBA scripting and I have following task: I have got a flowsheet diagram of a process drawn in Excel. Further, Excel calculates the single streams of the process (mass flows and concentrations). This data is written into several cells in the worksheet. What I want to do is to automatically update the values from the cells into textboxes that are attached to the flowsheet diagram. The problem I have is that I do not know how to address the existing textboxes with VBA. Could somebody give me a hint? Thanks, Luca |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy text from cells into different textboxes
Okay. But how do I address the textboxes? I have to set the variable
TextBox1 somehow and link it to one of the several textboxes spread on the worksheet. That's actually my main problem... |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy text from cells into different textboxes
TextBox1 is an Object Name, not a variable. But maybe if you explained what
you are trying to do, it would help to determine a better solution. "JazzyXXL" wrote: Okay. But how do I address the textboxes? I have to set the variable TextBox1 somehow and link it to one of the several textboxes spread on the worksheet. That's actually my main problem... |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy text from cells into different textboxes
I'll try to explain in more detail what I plan to do.
I have got a table like the following containing the composition of several streams in a chemical process: component stream 1 stream 2 stream 3 ... COMP1 1 t/h 0.2 t/h .... COMP2 0.5 t/h .... COMP3 2 t/h .... .... Further I have a flowsheet of the process as for example shown he http://de.wikipedia.org/wiki/RI-Flie%C3%9Fbild. What I want to do is to draw textboxes for each stream into this flowsheet and copy the content from the table into the respective textbox. Since I will run several simulations I would like to update the data in the textboxes without having to redraw and replace them. A sub or function of this type would be nice: update_textbox(textbox_ID As WhatEver, cells_to_copy_into_textbox As Range) Thanks for suggestions Luca |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Text blocks and multiline textboxes | Excel Programming | |||
Highlight text in textboxes | Excel Programming | |||
Clearing text in TextBoxes | Excel Programming | |||
Default text in textboxes | Excel Discussion (Misc queries) | |||
Text length and TextBoxes | Excel Programming |