Consulting

Results 1 to 6 of 6

Thread: Userform select and copy

  1. #1

    Exclamation Userform select and copy

    Hello

    I would like to make an userform to chose a range of values in a sheet and then chose an other sheet from an othe workk bokk and copy the values

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Why use a form, you could so it with two simple inputboxes

    [vba]
    Set src = Application.Inputbox("Select range to copy FROM with mouse",Type:=8)
    Set tgt = Application.Inputbox("Select first cell of range to copy TO with mouse",Type:=8)
    If Not src Is Nothing And Not tgt Is Nothing Then
    src.Copy rgt
    End IF
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3

    Copy in an other workbook

    The think id i want to copy this range in an other sheet on an other workbook

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    So, you select the other book in that code.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5

    Error

    Is giving me an error

    src.Copy rgt Copy method of Ranges Class Failed

  6. #6

    Found

    It was tgt

Posting Permissions

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