Results 1 to 4 of 4

Thread: VBA excel Range into a variable?

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Location
    Leeds
    Posts
    10

    VBA excel Range into a variable?

    Hello

    Does anyone know how i can pass the range (location) of a cell into a variable eg row F5 into x. i have got this far but does not work, what is the correct syntax

    x = xlap.ActiveCell.Range

    thanks in advance

  2. #2
    Addicted Member
    Join Date
    Aug 2003
    Location
    houston
    Posts
    185
    x = xlap.ActiveCell.Range
    .address

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Location
    Leeds
    Posts
    10
    i have tried the above but it does not work instead i recieve the error

    run time error 450

    wrong number of arguments or invalid property assignment


    do you think maybe my variable (x) needs to be something other than a string?

  4. #4
    Addicted Member
    Join Date
    Aug 2003
    Location
    houston
    Posts
    185
    sorry i meant activecell.address

Posting Permissions

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



Click Here to Expand Forum to Full Width