+ Reply to Thread
Results 1 to 8 of 8

cut textbox

Hybrid View

by1612 cut textbox 06-27-2006, 08:01 AM
Guest RE: cut textbox 06-27-2006, 09:35 AM
by1612 Thanks for your help. My... 06-27-2006, 08:20 PM
Guest Re: cut textbox 06-28-2006, 08:20 AM
by1612 command button 1 creates my... 06-28-2006, 07:05 PM
Guest Re: cut textbox 06-29-2006, 08:50 AM
by1612 Thanks Chris! Works great. 06-29-2006, 08:49 PM
by1612 I'm sorry, it seems that each... 06-30-2006, 07:19 AM
  1. #1
    CWillis
    Guest

    Re: cut textbox

    Here is the format I use. I suppose what is on the right of the = will
    change depending on user input...

    Sub tbtesting()

    TextBox1.Value = Sheet1.Range("B21").Value

    End Sub

    -Chris

    "by1612" wrote:

    >
    > Thanks for your help. My original text box was- drawn- with the macro
    > recorder on. I then added selection.formula = j7 (the cell containing
    > the synopsis) to the macro. As I said, this worked fine for displaying
    > the text box with the text. Now I've changed this to a text box from
    > the control toolbar (TextBox1), and while my buttons can make the box
    > appear and disappear, I can't seem to link the text I want to the box.
    > The error message says that my text box (selection.formuls =) does not
    > support this method.
    > So how do I link my content cell to the box?
    >
    >
    > --
    > by1612
    > ------------------------------------------------------------------------
    > by1612's Profile: http://www.excelforum.com/member.php...fo&userid=8611
    > View this thread: http://www.excelforum.com/showthread...hreadid=555976
    >
    >


  2. #2
    Registered User
    Join Date
    04-21-2004
    Posts
    28
    command button 1 creates my textbox (named textbox1 according to the properties window). Adding - TextBox1.value = sheet2.range("j7").value - generates run-time error '424', object required.

    command button 2 = TextBox1.cut

  3. #3
    CWillis
    Guest

    Re: cut textbox

    Try this:

    Private Sub CommandButton1_Click()

    'delete tb if it exists
    On Error Resume Next
    ActiveSheet.TextBoxes("TextBox1").Delete
    On Error GoTo 0

    'create tb
    ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, _
    120, 110, 210, 100).Select 'size the tb with the 4 #s
    Selection.Name = "TextBox1"
    Selection.Characters.Text = _
    Sheet1.Range("A25").Value 'change depending on user input

    End Sub

    Hope that helps.
    -Chris

    "by1612" wrote:

    >
    > command button 1 creates my textbox (named textbox1 according to the
    > properties window). Adding - TextBox1.value = sheet2.range("j7").value
    > - generates run-time error '424', object required.
    >
    > command button 2 = TextBox1.cut
    >
    >
    > --
    > by1612
    > ------------------------------------------------------------------------
    > by1612's Profile: http://www.excelforum.com/member.php...fo&userid=8611
    > View this thread: http://www.excelforum.com/showthread...hreadid=555976
    >
    >


  4. #4
    Registered User
    Join Date
    04-21-2004
    Posts
    28
    Thanks Chris! Works great.

  5. #5
    Registered User
    Join Date
    04-21-2004
    Posts
    28
    I'm sorry, it seems that each successful step leads to new questions. The generated text box (Text Box1) has a 256 character maximum, with set character size, font, etc. I guess because of it's nature, the TB has no properties window that I can access. Where do I insert statements to change these properties?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1