+ Reply to Thread
Results 1 to 2 of 2

Macro to insert object into spreadsheet ??

  1. #1
    Registered User
    Join Date
    08-18-2006
    Posts
    3

    Question Macro to insert object into spreadsheet ??

    Hi,

    I would like to have a square (ie. three cells long) that contains information that the user must input, and can be moved around the spreadsheet.
    Can I program this in VBA ?

    Any help is greatly appreciated.

    Alex

  2. #2
    Tom Ogilvy
    Guest

    RE: Macro to insert object into spreadsheet ??

    Sub AddATextBox()
    Dim rng As Range, bx As Shape
    Set rng = Range("B9:D9")
    Set bx = ActiveSheet.Shapes.AddTextbox( _
    msoTextOrientationHorizontal, _
    Top:=rng.Top, _
    Left:=rng.Left, _
    Width:=rng.Width, _
    Height:=0.75 * rng.Width)
    bx.TextFrame.Characters.Text = "Add some text here"
    With bx.TextFrame.Characters.Font
    .Name = "Arial"
    .FontStyle = "Regular"
    .Size = 10
    .Strikethrough = False
    .Superscript = False
    .Subscript = False
    .OutlineFont = False
    .Shadow = False
    .Underline = xlUnderlineStyleNone
    .ColorIndex = xlAutomatic
    End With

    End Sub


    is a possibility.

    --
    Regards,
    Tom Ogilvy


    "kluska" wrote:

    >
    > Hi,
    >
    > I would like to have a square (ie. three cells long) that contains
    > information that the user must input, and can be moved around the
    > spreadsheet.
    > Can I program this in VBA ?
    >
    > Any help is greatly appreciated.
    >
    > Alex
    >
    >
    > --
    > kluska
    > ------------------------------------------------------------------------
    > kluska's Profile: http://www.excelforum.com/member.php...o&userid=37740
    > View this thread: http://www.excelforum.com/showthread...hreadid=573242
    >
    >


+ 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