Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I want the text typed in by a user in a textbox on a userform to be transferred to a textbox in the worksheet. Capturing the typed text is easy : Textbox.Value Creating a textbox on the sheegt a bit more complex : ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextB ox.1", Link:=False, DisplayAsIcon:=False, Left:=528.75, Top:=204, Width:=432, Height:=77.25).Select But how do I get the Textbox.Value into the new created textbox? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() One way.... Dim obj As Object Set obj = ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextB ox.1", Link:=False, DisplayAsIcon:=False, Left:=528.75, Top:=204, Width:=432, _ Height:=77.25) obj.Object.Text = "something" If this post helps click Yes --------------- Jacob Skaria "Henk" wrote: I want the text typed in by a user in a textbox on a userform to be transferred to a textbox in the worksheet. Capturing the typed text is easy : Textbox.Value Creating a textbox on the sheegt a bit more complex : ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextB ox.1", Link:=False, DisplayAsIcon:=False, Left:=528.75, Top:=204, Width:=432, Height:=77.25).Select But how do I get the Textbox.Value into the new created textbox? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Great! Working.
But now the second step. How do I capture the text from the textbox in the worksheet in a string variable to transfer it somewhere else? "Jacob Skaria" wrote: One way.... Dim obj As Object Set obj = ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextB ox.1", Link:=False, DisplayAsIcon:=False, Left:=528.75, Top:=204, Width:=432, _ Height:=77.25) obj.Object.Text = "something" If this post helps click Yes --------------- Jacob Skaria "Henk" wrote: I want the text typed in by a user in a textbox on a userform to be transferred to a textbox in the worksheet. Capturing the typed text is easy : Textbox.Value Creating a textbox on the sheegt a bit more complex : ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextB ox.1", Link:=False, DisplayAsIcon:=False, Left:=528.75, Top:=204, Width:=432, Height:=77.25).Select But how do I get the Textbox.Value into the new created textbox? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
'if you know the name..
Activesheet.oleobjects("TextBox1").object.text OR 'if you have only one text box in the activesheet Activesheet.oleobjects(1).object.text If this post helps click Yes --------------- Jacob Skaria "Henk" wrote: Great! Working. But now the second step. How do I capture the text from the textbox in the worksheet in a string variable to transfer it somewhere else? "Jacob Skaria" wrote: One way.... Dim obj As Object Set obj = ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextB ox.1", Link:=False, DisplayAsIcon:=False, Left:=528.75, Top:=204, Width:=432, _ Height:=77.25) obj.Object.Text = "something" If this post helps click Yes --------------- Jacob Skaria "Henk" wrote: I want the text typed in by a user in a textbox on a userform to be transferred to a textbox in the worksheet. Capturing the typed text is easy : Textbox.Value Creating a textbox on the sheegt a bit more complex : ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextB ox.1", Link:=False, DisplayAsIcon:=False, Left:=528.75, Top:=204, Width:=432, Height:=77.25).Select But how do I get the Textbox.Value into the new created textbox? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
tHenks Jacob, your help is highly appreciated.
This all is part of a complex code creatring a sort of batch sending charts from Excel to a PowerPoint presentation. That is all working fine now, but I want to give the user the possibility to add comments to the charts. Capturing the comment is okay now, but I have to transfer it to PowerPoint once it is on the Excel sheet and the batch procedure is started. I tried to do something like this : If Comment = True Then PPSlide.Shapes.AddTextbox(Type:=msoTextOrientation Horizontal, Left:=100, Top:=100, Width:=200, Height:=50).TextFrame.TextRange.Text = TheCommentBelongingToTheChart End If The code is nearly copied from Help in PowerPoint, but I get the message : Named argument not found. I think it has something to do with : Type:=msoTextOrientationHorizontal Any idea? "Jacob Skaria" wrote: 'if you know the name.. Activesheet.oleobjects("TextBox1").object.text OR 'if you have only one text box in the activesheet Activesheet.oleobjects(1).object.text If this post helps click Yes --------------- Jacob Skaria "Henk" wrote: Great! Working. But now the second step. How do I capture the text from the textbox in the worksheet in a string variable to transfer it somewhere else? "Jacob Skaria" wrote: One way.... Dim obj As Object Set obj = ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextB ox.1", Link:=False, DisplayAsIcon:=False, Left:=528.75, Top:=204, Width:=432, _ Height:=77.25) obj.Object.Text = "something" If this post helps click Yes --------------- Jacob Skaria "Henk" wrote: I want the text typed in by a user in a textbox on a userform to be transferred to a textbox in the worksheet. Capturing the typed text is easy : Textbox.Value Creating a textbox on the sheegt a bit more complex : ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextB ox.1", Link:=False, DisplayAsIcon:=False, Left:=528.75, Top:=204, Width:=432, Height:=77.25).Select But how do I get the Textbox.Value into the new created textbox? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
pass to textbox on a form and to excel worksheet | New Users to Excel | |||
Userform Textbox to Worksheet Textbox | Excel Programming | |||
Textbox from 1st worksheet to textbox to other multiple sheets | Excel Programming | |||
put worksheet values into textbox on form | Excel Programming | |||
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys | Excel Programming |