Enter data in a cell, then Macros greyed out

UHsoccer

Well-known Member
Joined
Apr 3, 2002
Messages
1,023
I enter data in a cell, then select Tools / Macro the Macros selection is under-lighted (not active)

When I click in a different cell, then click on the cell in which I entered the data, the Macros is selectable.

The macros needs to read not only WHICH cell is selected but also what is in the cell. As is, I have to "teach" the user to enter the data, click elsewhere, then click the previous cell again, befoe the Macro is available. There has to be a solution for this.

Hope that makes sense.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

anis

Board Regular
Joined
Dec 28, 2004
Messages
87
why do u want ur macro to read the data? is there any further data processing involved? y dont u used a variable to store the value of the selected range?

Code:
Dim strVal As String

strVal = Selection.Value

that's if i understood ur situation correctly :wink:

regards,
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
Hello, UHsoccer,

While editing a cell it's impossible to start macros.
It's normal that this option is not available.
How could you run a macro if the result of a cell is still incertain (being edited) ?

kind regards,
Erik
 

UHsoccer

Well-known Member
Joined
Apr 3, 2002
Messages
1,023
My macro needs to know the ONE cell in which I entered a value (it uses that for subsequent processing)

I was hoping that by selecting the macro (which is added to the menu list at the top) it would imply that I was finished entering data.

But I gues not
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
perhaps you can use something like this
put it in the worksheetmodule

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "you just changed cell " & Target.Address & " to " & Target.Value, 64, "cell info"
End Sub

kind regards,
Erik
 

Forum statistics

Threads
1,147,620
Messages
5,742,177
Members
423,708
Latest member
vagosh2001

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top