+ Reply to Thread
Results 1 to 5 of 5

VBA Code Debug Error

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    VBA Code Debug Error

    Hi, I have created a macro enabled excel spreadsheet using VBA code to link from one sheet to another with filtered values.

    The problem is that when I use the sheet and click in the AH cell in the Opportunities tab I get an error - see Image1.

    Image1.jpg

    When I click on Debug, it takes me to the VBA - see Image2.

    Image2.jpg

    There are a couple of things puzzling me; 1 - When I click on the links in the AI cell in the Opportunities tab it works fine, and 2 - my colleague at work never sees the error I get. When he opens the file he is prompted to enable editing and then enable content in Excel (I am not prompted for this).

    I have attached an example of the xlsm that I have created.

    Any help would be greatly appreciated.

    Many thanks,
    Steve
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: VBA Code Debug Error

    Target is, by its nature, a Range - adding .Range when addressing it is confusing issues. So:

    Please Login or Register  to view this content.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: VBA Code Debug Error

    The code works fine for me.

    Are you just clicking single cells?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: VBA Code Debug Error

    Hi, I am clicking AH6, AH7, AH8 and AH9 to get the error. Clicking cells AI6..AI9 work fine and take me to the Time worksheet filtered as it should be.

  5. #5
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: VBA Code Debug Error

    So, in column 34 (AH), you're trying to get a value 34 columns to the left of it - i.e. one column to the left of column A.

    As that column doesn't exist the code is throwing an error.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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