Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Private Sub Get_Details_Click() (2003)

    Private Sub Get_Details_Click()

    Why can i not move / drag the above button? My worksheet is not locked, but I can't move it? <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Private Sub Get_Details_Click() (2003)

    Private Sub Get_Details_Click() is not a button, but Visual Basic code. Please try to explain what you mean more clearly.

  3. #3
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Private Sub Get_Details_Click() (2003)

    The button that executes the code in the sheet object. I have another button that is linked to a standard macro, I can move that around the worksheet, but i cannot move this one? When I right click it, there is no normal cut / delete dialogue and no surrounding box to allow resizing or dragging?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Private Sub Get_Details_Click() (2003)

    But what has the code and the subject of the post to do with the question?

  5. #5
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Private Sub Get_Details_Click() (2003)

    I was attempting to explain that it was not a standard button, but a code button. Sorry for the confusion.

  6. #6
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Private Sub Get_Details_Click() (2003)

    Nathan,

    I don't know what a "code button" is. How was this button created?

    StuartR

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Private Sub Get_Details_Click() (2003)

    Whether a button has code assigned to it has nothing to do with whether the button can be moved around.

    Could you attach a copy of the workbook (zipped if necessary) with everything removed except for the button?

  8. #8
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Private Sub Get_Details_Click() (2003)

    Attached: The middle button is fine, the top & bottom seem "locked".

    May I also ask, in the code, my <HTML><TAB><HTML> does not act as a TAB instruction as I hoped. I guess my syntax is wrong?
    Attached Files Attached Files

  9. #9
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Private Sub Get_Details_Click() (2003)

    The top and bottom buttons seem easy to move, just click on them and then drag.

    The middle button can be moved, it is just that when you click on it you activate the code so it is hard to grab the button with your mouse. Try RIGHT clicking on the button, so that the border appears, then you can drag it by the border.

    StuartR

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Private Sub Get_Details_Click() (2003)

    The buttons with caption "Get Account Number and Name" and "Send Form to $HCS VISA MISSING PAYMENTS" are buttons from the Control Toolbox toolbar.
    If you want to move them around, you have to turn on design mode (first button on the Control Toolbox). You can then click on one of these buttons to select it, and drag it around, as well as set properties in the Properties window (second button on the Control Toolbox).

    The button with caption "Clear Contents" is a button from the Forms toolbar. To select it, you have to right-click it. You'll see a gray border around it, you can drag it using this border, and resize it using the handles around the edges. See screenshot.
    Attached Images Attached Images
    • File Type: png x.png (1.0 KB, 0 views)

  11. #11
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Private Sub Get_Details_Click() (2003)

    Replying to your other point
    <hr>May I also ask, in the code, my <HTML><TAB><HTML> does not act as a TAB instruction as I hoped. I guess my syntax is wrong?<hr>
    HTML syntax does not include a tab at all. You would have to create an html table to achieve the sort of layout you are trying to create.

    See a basic guide to HTML such as this one for more information.

    StuartR

  12. #12
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Private Sub Get_Details_Click() (2003)

    Many Thanks Hans, I thought I was going nuts there for a minute!! I do not usually use buttons from the control toolbox. And thanks for the link.

  13. #13
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Private Sub Get_Details_Click() (2003)

    I may be a million miles away, or missing something obvious, but am struggling to turn this into a table. Please would you assist with the attached. Thanks
    Attached Files Attached Files

  14. #14
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Private Sub Get_Details_Click() (2003)

    I don't see how code like
    <code>.HTMLBody = "
    <td>Range("C5")</td>
    </code>
    is supposed to work. I think you will need to build up the HTML body in a string variable by concatenating the literal strings, such as <td> with the VBA code such as Range("C5") using syntax like
    <code>strBody = strBody & "<td>" & Range("C5") </code>
    etc.

    And then you can just use
    <code>.HTMLBody = strBody </code>

    StuartR

  15. #15
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Private Sub Get_Details_Click() (2003)

    Thanks Stuart, I am getting there slowly.... One quick question (I knot this is straying from excel).....

    "<HTML><table><HTML>" & _
    "<HTML><tr><HTML>" & "<HTML><td><HTML>" & Range("C5") & " - " & "<HTML></td><HTML>" &

    I am trying to add alignment tags, but for some reason I am struggling with the syntax?

Page 1 of 2 12 LastLast

Posting Permissions

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