PC Review


Reply
Thread Tools Rate Thread

copy text from cells into different textboxes

 
 
JazzyXXL
Guest
Posts: n/a
 
      31st Mar 2008
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
 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      31st Mar 2008
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
>

 
Reply With Quote
 
JazzyXXL
Guest
Posts: n/a
 
      31st Mar 2008
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...

 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      31st Mar 2008
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...
>
>

 
Reply With Quote
 
JazzyXXL
Guest
Posts: n/a
 
      1st Apr 2008
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 here:
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy text out of a range of cells Mark B Microsoft Excel Worksheet Functions 3 7th May 2008 09:17 AM
copy text of cells down to blank cells =?Utf-8?B?YW5kcmVzZzE5NzU=?= Microsoft Excel Programming 3 5th Oct 2006 07:14 PM
how can we copy cells comments text and paste to cells =?Utf-8?B?16nXmSDXpNec15M=?= Microsoft Excel Misc 2 10th Dec 2005 03:22 PM
Form with cells and TextBoxes...how to TAB to textboxes? Toby Erkson Microsoft Excel Discussion 2 6th Oct 2004 11:53 PM
Re: Auto Copy TEXT cells Frank Kabel Microsoft Excel Worksheet Functions 0 7th Apr 2004 02:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:57 PM.