Results 1 to 20 of 28

Thread: Solved: Customizing How Word Displays Information from Excel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11

    RE:

    Kenneth, I applied something similar to my script, and I got some errors, but then I tweaked it a bit and it seemed to have worked! Thanks Georgiboy and Kenneth.

    I may marked this topic as solved and start a new thread, let me know what your advice is after reading this reply.

    (See attachment)
    The script works well, but after speaking with some co-workers they also want a drop down box that drops down to the active line (like the command button does)...And the reason for this drop down is, it selects a transmittal template. So for example the three options inside the drop down would be "Filing", "Pipeline X-Rays", "Boxes", once a user goes to a line, then the user will select which transmital template they want (ie: x-ray, filing, box), then click "Create Transmittal"...And depending on which template the user selects each transmittal is slightly different.

    So is this how I approached this, but I encountered a couple of errors..Ive added the combo-box; now above the command button statement, I would add:
    [vba]

    Private Sub ComboBox1_Change(ByVal Target As Range)
    'If Target.Row = Me.ComboBox1.TopLeftCell.Row Then Exit Sub
    Me.ComboBox1.Top = Range("H" & Target.Row).Top
    Me.ComboBox1.Left = Range("H" & Target.Row).Left
    End Sub
    Private Sub CommandButton1_Click()
    TransferData
    End Sub
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    'If Target.Row = Me.CommandButton1.TopLeftCell.Row Then Exit Sub
    Me.CommandButton1.Top = Range("G" & Target.Row).Top
    Me.CommandButton1.Left = Range("G" & Target.Row).Left

    End Sub
    [/vba]

    Then, once that is accomplished, went down to the 'Transfer Data' part of the script, and divided it up into three parts that only are called when a selection in the combo box is clicked...the way I did it was by using elseif but I deleted my script, because it simply just didn't work, too many errors. I was trying to use the Range("").Value = entername.Value
    but I couldn't apply that to my situation here.


    Anyway - my attachment has the combo box, and if you guys want to see my original script I can quickly throw it back together for you and post the attachment...But let me know your thoughts...

    Thanks!
    Last edited by IcePirates; 12-09-2008 at 08:32 AM.

Posting Permissions

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