Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 240879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:42:23+00:00 2026-05-11T20:42:23+00:00

I am working on a spreadsheet with lots of VBA code in it. Most

  • 0

I am working on a spreadsheet with lots of VBA code in it. Most cell references use numbers, e.g.

Worksheets("Sheet1").Cells(someRow, someColumn)

I am wondering if there is any easy way to find out exactly which cell is being referenced – is it possible to put a breakpoint on this line of code, and then see which cell it will refer to (using the traditional “BA10” style) or will I have to calculate it each and every time using divs and mods?

Not all the references are hard coded, and I would really like to be able to work out where data is being pulled from, as the cell is accessed (not necessarily changed).

(edit) Is it possible to do this without changing the original source line, e.g. in an event module or something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:42:23+00:00Added an answer on May 11, 2026 at 8:42 pm

    There is another option. If you are making changes to a sheet, you can catch the Change event on the Worksheet, and pump out the changed range like so:

    Private Sub Worksheet_Change(ByVal Target As Range)
        Debug.Print "CHANGED -> " & Target.Address(False, False)
    End Sub
    

    Each change to the sheet will be output to your Immediate window like thus:

    CHANGED -> G10
    CHANGED -> G11:G28
    

    There is also the SelectionChange event as well, but that’s unlikely to be too useful. There is no event for just “reading” cells.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on some code that generates an Excel spreadsheet server-side and then downloads
Working with some spreadsheet stuff, internally the columns are referred to by a simple
I'm working on an application which big part will be a spreadsheet-like view (with
I'm working on a vb.net application which imports from an Excel spreadsheet. If rdr.HasRows
I am trying to start working with Excel documents through the OpenXML SDK Spreadsheet
hi i am using pear spreadsheet in my project. its working fine on the
I have a Delphi application which reads data from an excel spreadsheet using code
Working with dates in ruby and rails on windows, I'm having problems with pre-epoch
Working with a SqlCommand in C# I've created a query that contains a IN
Working on a project at the moment and we have to implement soft deletion

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.