Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default REFRENCE A TEXTBOX ON A SHEET IN EXCEL 2000

Hi

I have a text box on sheet 2 which I want to populate with results from 3
cells on sheet 1 new to VB and not sure how to go about this any help
appreciated. thnxs
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default REFRENCE A TEXTBOX ON A SHEET IN EXCEL 2000

Try

Sheets("Sheet2").TextBox1.Text = Sheets("Sheet1").Range("A1").Text

Mike

"Songoku" wrote:

Hi

I have a text box on sheet 2 which I want to populate with results from 3
cells on sheet 1 new to VB and not sure how to go about this any help
appreciated. thnxs

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default REFRENCE A TEXTBOX ON A SHEET IN EXCEL 2000

Ah,

You wanted 3 cells in the tectbox, maybe this instead

Sub marine()
With Sheets("Sheet1")
mystring = .Range("A1").Text & .Range("A2").Text & .Range("A3").Text
End With
Sheets("Sheet2").TextBox1.Text = mystring
End Sub

Mike

"Mike H" wrote:

Try

Sheets("Sheet2").TextBox1.Text = Sheets("Sheet1").Range("A1").Text

Mike

"Songoku" wrote:

Hi

I have a text box on sheet 2 which I want to populate with results from 3
cells on sheet 1 new to VB and not sure how to go about this any help
appreciated. thnxs

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default REFRENCE A TEXTBOX ON A SHEET IN EXCEL 2000

Hi,

Welcome to the world of Excel Programming !
1) Since you want the textbox to store the contents of 3 cells in Sheet1.
Assuming these 3 cells are(A1 , A2 & A3)
in Cell A4, add the formula =A1 & " " & A2 & " " & A3

2) In the design View, Right Click the TextBox, click Properties-
LinkedCell Field.
Enter "Sheet1!A4" (Without quotes)

Exit the design view, the value from A4 cell in sheet 1 will be displayed in
the textbox.

Cheers,
--
Tausif Mohammed


"Songoku" wrote:

Hi

I have a text box on sheet 2 which I want to populate with results from 3
cells on sheet 1 new to VB and not sure how to go about this any help
appreciated. thnxs

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default REFRENCE A TEXTBOX ON A SHEET IN EXCEL 2000

Ta Tausif....

should have mentioned that this is not a form, when I right click on the
text box I do not have what you mention below....it is a shape\text box which
is dragged onto a sheet


"Tausif" wrote:

Hi,

Welcome to the world of Excel Programming !
1) Since you want the textbox to store the contents of 3 cells in Sheet1.
Assuming these 3 cells are(A1 , A2 & A3)
in Cell A4, add the formula =A1 & " " & A2 & " " & A3

2) In the design View, Right Click the TextBox, click Properties-
LinkedCell Field.
Enter "Sheet1!A4" (Without quotes)

Exit the design view, the value from A4 cell in sheet 1 will be displayed in
the textbox.

Cheers,
--
Tausif Mohammed


"Songoku" wrote:

Hi

I have a text box on sheet 2 which I want to populate with results from 3
cells on sheet 1 new to VB and not sure how to go about this any help
appreciated. thnxs



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default REFRENCE A TEXTBOX ON A SHEET IN EXCEL 2000

Thnks Mike

I tried the code you suggested (modified) however I get the following error
come up
"Runtime error 438 - object doesnt support this property or message"

any suggestions?

"Mike H" wrote:

Ah,

You wanted 3 cells in the tectbox, maybe this instead

Sub marine()
With Sheets("Sheet1")
mystring = .Range("A1").Text & .Range("A2").Text & .Range("A3").Text
End With
Sheets("Sheet2").TextBox1.Text = mystring
End Sub

Mike

"Mike H" wrote:

Try

Sheets("Sheet2").TextBox1.Text = Sheets("Sheet1").Range("A1").Text

Mike

"Songoku" wrote:

Hi

I have a text box on sheet 2 which I want to populate with results from 3
cells on sheet 1 new to VB and not sure how to go about this any help
appreciated. thnxs

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
Countif and Sumif with refrence value a Cell on another Sheet in theWorkbook Mike 215 Excel Discussion (Misc queries) 3 September 3rd 09 03:51 AM
Help! Refrence a userform element from a textbox? [email protected] Excel Programming 2 January 18th 08 09:55 PM
Help! Refrence a userform element from a textbox? [email protected] Excel Programming 0 January 18th 08 09:04 PM
Textbox with insert Rows in Excel 2000 VBA Larry D[_2_] Excel Programming 1 March 17th 07 03:25 PM
Help needed with textbox formatting in Excel 2000 JIMBROOKS Excel Discussion (Misc queries) 1 January 1st 05 03:33 PM


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