Macro control

  • Thread starter Thread starter Edwin Merced
  • Start date Start date
Sort of vague. Where is the variable? In a cell on a
worksheet? Need to us a little more input here.
 
I might suggest a couple ways, but not sure exactly what your trying to do.
Here's one example.

In the VB Editor "Project Explorer", right click on "ThisWorkbook", and
select "View Code". Click the drop down box on the left side, and pick
workbook. Now click the right drop down box and select
"SheetSelectionChange"

add the following code

If ActiveCell.Value = "test" Then
Range("B1").Value = "test"
Else
Range("B1").Value = ""
End If

Now, go to cell "A1" in your worksheet and type the word "test" (without the
quotes)

Now watch what happens in "B1" when you click the mouse on any cell except
"A1", then try clicking on "A1".

Is this anything like you're looking for? You can use other workbook events
to trigger your code. Look up "workbook object" in the VB Editor Help menu,
then select "Events"

Did this help?

D.S.
 
But what I would like is to write in a cell and make that go to the code in
VBA. Is it possible?
 
Back
Top