Need help with ActiveCell

curtryan45

New Member
Joined
Jun 6, 2008
Messages
17
Ok, here is what I am trying to do. I have a list of items. I want to be able to click on any item in that list, then hit a commandbutton(contains the macro) which will then find whatever I clicked on in another table. Here is what I have so far. Note : The cells I will be clicking on have text, not numbers

Sub Button36_Click()
Dim CurCell as Range
Dim c As Range
Set CurCell = ActiveCell.Value
Set c = Range("C4:C18").Find("CurCell")
End Sub
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi,

Try:

Code:
Dim c As Range
Set c = Range("C4:C18").Find(What:=ActiveCell.Value, LookIn:=xlValues)

Hope it helps,

Dom
 
Last edited:
Upvote 0
Sub Button36_Click()
Dim CurCell as Variant
Dim c As Range
'Set CurCell = ActiveCell.Value
CurCell = ActiveCell.Value
Set c = Range("C4:C18").Find(CurCell)
End Sub

Code:
Dim c As Range
Set c = Range("C4:C18")Find(ActiveCell.Value)
 
Upvote 0

Forum statistics

Threads
1,214,665
Messages
6,120,803
Members
448,990
Latest member
rohitsomani

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
Back
Top