+ Reply to Thread
Results 1 to 5 of 5

Returning value from Activecell.column

  1. #1
    Registered User
    Join Date
    07-27-2021
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    8

    Returning value from Activecell.column

    Hello!

    Probably a noob question, but I am a noob, and i cant find the answer anywhere.

    when I use this code:

    Dim Startcell As Variant
    Set Startcell = Cells(ActiveCell.Column)

    I cant get "Startcell" to take the value from ActiveCell.Column. I can see that ActiveCell.Column has a value, but its not transfered to "Startcell"

    If i change it to:

    Dim Startcell As Variant
    Set Startcell = ActiveCell.Column

    I get an error saying that object is missing.

    What am I doing wrong?

    Appreciate any help!

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,836

    Re: Returning value from Activecell.column

    It would be easier to help and test possible solutions if you could attach a copy of your file. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary). See the yellow banner at the top of this page for instructions to attach a file.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Returning value from Activecell.column

    I agree with the above but do you just want startcell to be the column number of the active cell?


    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    07-27-2021
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    8

    Re: Returning value from Activecell.column

    Okay, i will Attach a copy when i have the possibility.

    you are correct, I want Startcell to be the column number of the active cell
    Last edited by AliGW; 07-27-2021 at 08:52 AM. Reason: PLEASE don't quote unnecessarily!

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,836

    Re: Returning value from Activecell.column

    Try:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. difference in between activecell.activate and activecell.select
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2020, 03:14 AM
  2. [SOLVED] Button to Copy Column Range with ActiveCell position, Losing formatting after 3rd column
    By xlyfe in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-16-2018, 03:42 PM
  3. Returning Activecell when pressing a button
    By gvaltat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2014, 02:40 PM
  4. [SOLVED] From Activecell, Paste cell value on current row into column A, Column B, D, and G
    By bg_enigma1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2012, 03:43 PM
  5. Output contents of Activecell when Activecell may be string or numeric.
    By jfriddle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2012, 12:27 PM
  6. Using ActiveCell to specify a column
    By DavidW in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-23-2006, 08:49 AM
  7. [SOLVED] returning the activecell's page number
    By gill in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-07-2006, 03:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1