Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Countif and Sumif with refrence value a Cell on another Sheet in theWorkbook | Excel Discussion (Misc queries) | |||
Help! Refrence a userform element from a textbox? | Excel Programming | |||
Help! Refrence a userform element from a textbox? | Excel Programming | |||
Textbox with insert Rows in Excel 2000 VBA | Excel Programming | |||
Help needed with textbox formatting in Excel 2000 | Excel Discussion (Misc queries) |