B
buczacz
I've spent lots of time looking at this with zip results. Perhaps one
of the pros that read this post can tell me what I'm doing wrong.
In a macro written using Excel95 I declare:
Public IDN As Integer
Then in the macro "Contact_History" I use the command:
IDN = ActiveSheet.Cells(ActiveCell.Row, 1).Value
The macro is activated by clicking a SOFTWARE button assigned to the
macro "Contact_History" positioned in the top row over cell B1.
When using EXCEL95, when I click on the SOFTWARE button assigned to the
macro "Contact History," The macro runs and IDN is the value in the
first column of the row containing the active cell as expected.
When using EXCEL97, when I click on the SOFTWARE button assigned to the
macro "Contact History," The macro runs and IDN ends up being the value
of the first column of the TOP row. After the macro has run, the
selected cell is no longer the initially selected cell; it is now the
top left cell.
When I run the macro from the pull-down tools menu, the macro runs
correctly. Furthermore, the initially selected cell remains the
selected cell after the macro has run.
It seems that in my version of Excel97, the action of clicking on the
SOFTWARE button also makes the underlying cell the active cell.
Can anyone offer a suggestion as to how to get out of this problem other
than by the elimination of the SOFTWARE button?
WindsurferLA
of the pros that read this post can tell me what I'm doing wrong.
In a macro written using Excel95 I declare:
Public IDN As Integer
Then in the macro "Contact_History" I use the command:
IDN = ActiveSheet.Cells(ActiveCell.Row, 1).Value
The macro is activated by clicking a SOFTWARE button assigned to the
macro "Contact_History" positioned in the top row over cell B1.
When using EXCEL95, when I click on the SOFTWARE button assigned to the
macro "Contact History," The macro runs and IDN is the value in the
first column of the row containing the active cell as expected.
When using EXCEL97, when I click on the SOFTWARE button assigned to the
macro "Contact History," The macro runs and IDN ends up being the value
of the first column of the TOP row. After the macro has run, the
selected cell is no longer the initially selected cell; it is now the
top left cell.
When I run the macro from the pull-down tools menu, the macro runs
correctly. Furthermore, the initially selected cell remains the
selected cell after the macro has run.
It seems that in my version of Excel97, the action of clicking on the
SOFTWARE button also makes the underlying cell the active cell.
Can anyone offer a suggestion as to how to get out of this problem other
than by the elimination of the SOFTWARE button?
WindsurferLA