maiatanaka
New Member
- Joined
- Dec 9, 2021
- Messages
- 5
- Office Version
-
- 2016
- Platform
-
- Windows
NOTICE: I know merged cells are horrible but I made a drop-down list so I merged the cells in order to allow the entire text show up when clicking on the drop-down button.
That being said, I'm trying to run a code that shows a shape box upon selection of cells. Using a code I found online, it works for every single cell but when I reach the merged cells, I can't seem to get the code to work. I've tried Target.Cells(1).Address(0,0); I've tried doing selection.count(2) alongside intersect; I've tried deeming ranges but nothing seems to work. Anybody have a clue about what I can do?
(I tried using center across selection but the problem is that the drop down button would then be out of place. This sheet is being used as a form sheet so resizing the columns also isn't an option at the moment...unless anybody has an idea of how I could arrange this?)
That being said, I'm trying to run a code that shows a shape box upon selection of cells. Using a code I found online, it works for every single cell but when I reach the merged cells, I can't seem to get the code to work. I've tried Target.Cells(1).Address(0,0); I've tried doing selection.count(2) alongside intersect; I've tried deeming ranges but nothing seems to work. Anybody have a clue about what I can do?
(I tried using center across selection but the problem is that the drop down button would then be out of place. This sheet is being used as a form sheet so resizing the columns also isn't an option at the moment...unless anybody has an idea of how I could arrange this?)
VBA Code:
If Selection.Count = 2 Then
If Not Intersect(Target, Range("RentalSignature")) Is Nothing Then
ActiveSheet.Shapes("RentalAgreementBox").Visible = True
Else
ActiveSheet.Shapes("RentalAgreementBox").Visible = False
End If