+ Reply to Thread
Results 1 to 3 of 3

Run-time error ‘1004’: Method ‘Range’ of ‘object’_Global’ failed.

  1. #1
    Registered User
    Join Date
    12-13-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    68

    Run-time error ‘1004’: Method ‘Range’ of ‘object’_Global’ failed.

    The scenario is that I have certain words in texts (Range Cells - C12:C68 , F14:F68) and where matched to the range of words with colours in Cells Z1:Z20 then the Macro when run should change colours of the words and the piece of code that is giving me the following error -
    Run-time error ‘1004’:
    Method ‘Range’ of ‘object’_Global’ failed.
    And in the code line - MyColList = Application.Transpose(Range("MyRange").Value) is highlighting in yellow indicating where the problem is.

    Please could someone help.

    The code is:-
    Please Login or Register  to view this content.
    Thanking you in advance
    warm regards
    Dhiresh

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Run-time error ‘1004’: Method ‘Range’ of ‘object’_Global’ failed.

    Hi, dhiresh,

    proper Dims for the variables would have helped you solve the problem on your own.

    You use
    Please Login or Register  to view this content.
    MyRange is of Type Variant as it hasn´t been specified, r is Range.

    MyRange has neither been given the Address of any Range nor has it been set as a Range in your code.

    If you address
    Please Login or Register  to view this content.
    there should be a cell or a range with the name of MyRange in the Worksheet which the code could refer to but then I would omit the variable of the same name.

    HTH,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    12-13-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Run-time error ‘1004’: Method ‘Range’ of ‘object’_Global’ failed.

    Hi Holger,

    The issue is not resolved and many thx for you assistance.

    Warm Regards
    Dhiresh

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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