Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
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
Text blocks and multiline textboxes Mats Samson Excel Programming 0 September 20th 07 07:52 PM
Highlight text in textboxes Frederick Chow Excel Programming 2 January 3rd 06 05:26 PM
Clearing text in TextBoxes CG Rosén Excel Programming 3 August 18th 05 10:01 PM
Default text in textboxes MissGenie Excel Discussion (Misc queries) 1 June 7th 05 01:22 PM
Text length and TextBoxes Ron_D[_2_] Excel Programming 4 December 28th 04 09:47 AM


All times are GMT +1. The time now is 08:43 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"