Consulting

Results 1 to 3 of 3

Thread: need help in macro to select a column

  1. #1
    VBAX Newbie
    Joined
    Jan 2019
    Posts
    2
    Location

    need help in macro to select a column

    Hi.I am trying to insert excel data into PDF documents.in this is part of code I need help

    Dim vClient As Variant

    vClient = Range(Selection.Row & ":" & Selection.Row)

    sFileFields = Replace(sFileFields, "---NAME1---", vClient(1, 2))
    sFileFields = Replace(sFileFields, "---NAME2---", vClient(1, 3))
    sFileFields = Replace(sFileFields, "---NAME3---", vClient(1, 4))

    This code works for selection row but when i change it to
    vClient = Range(Selection.column & ":" & Selection.column)

    The code doesn't choose selected column. I want to select selection column just like row in upper code.

  2. #2
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location
    vClient = Columns(Selection.Column)

  3. #3
    VBAX Newbie
    Joined
    Jan 2019
    Posts
    2
    Location
    Thank you very much mana. you are a life saver. Thank you

Posting Permissions

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