+ Reply to Thread
Results 1 to 6 of 6

getting runtime error for current range macro

  1. #1
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    getting runtime error for current range macro

    I would like from any worksheet of my workbook to activate the macro below for sheet workings

    but getting run time error 1004
    unable to get the select property of range class

    Can anyone assist

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: getting runtime error for current range macro

    First of all, you don't actually need to select in the code.

    Second, if you can describe what you are trying to accomplish that would help.

    If you remove .select, the code is fine.
    HTH
    Regards, Jeff

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: getting runtime error for current range macro

    Basically - you cannot select anything what is not on the currently active sheet. So either:

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    or of course

    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,485

    Re: getting runtime error for current range macro

    You don't select like that
    Please Login or Register  to view this content.
    Or
    Please Login or Register  to view this content.
    Also, you have to be on that sheet in order for this to work

  5. #5
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: getting runtime error for current range macro

    Jeffrey,Kaper,davesexcel thank you for solutions provided and explanations ,all work fine now.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: getting runtime error for current range macro

    Glad you have found a solution that will work for you. You're welcome and We are happy to help.

+ 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. Macro vba auto email runtime error when having difrent sheet to name range sheet open
    By no1freeman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2015, 01:35 AM
  2. Runtime error '1004': Paste special method of range class error.
    By Daryl Zer0 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-05-2014, 01:44 AM
  3. Runtime error '13' Type Mismatch - Determining current age
    By Sorjas in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2014, 01:27 AM
  4. [SOLVED] VBA Error: Runtime Error 1004: AutoFilter method of Range class failed
    By jl22stac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2013, 07:27 PM
  5. [SOLVED] Runtime Error 1004 when Copying worksheets from multiple workbooks into current workbook
    By dharris42 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2013, 11:56 AM
  6. [SOLVED] Range error in code, runs alone but not inside my full program, giving runtime error 1004
    By charizzardd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-23-2012, 03:34 PM
  7. Runtime error 3021 Either BOF or EOF is true or the current record has been deleted.
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-19-2011, 01:52 PM

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