largeselection
Active Member
- Joined
- Aug 4, 2008
- Messages
- 358
I'm having some trouble getting a private sub to initiate and I'm sure it's because I don't have a target specified.
The first part of code puts a checkmark into a cell if it is clicked and that initiates another code called "BUILDER":
Then there are a lot of "cases". I have another sub which is assigned to a button which basically puts a checkmark in the cells of a selected range if they are visible and the issue is that even though the checkmarks appear, I can't get them to register as a "case" and thus launch the "BUILDER" code. After some reseach I'm sure it is because there is no target specified in my "selectvisible" code. So I can't Call/run/ etc the worksheet_selectionchange code since it doesn't know which targets. So how can I either specify my selection should equal targets? Or can I use something like if not isempty(selection) then select case selection.address?
Here is the code for the selectvisible:
PS- All Code is located in the Sheet1 Code.
The first part of code puts a checkmark into a cell if it is clicked and that initiates another code called "BUILDER":
Code:
Private sub worksheet_selectionchange(ByVal target As Range)
If IsEmpty(target) Then
target.Formula = "=CHAR(252)"
target.Value = target.Value
With target.Font
.Name = "Wingdings"
.FontStyle = "Bold"
.Size = 8
End With
If Not IsEmpty(target) Then
Select Case target.Address
Case "$A$3"
Builder "B"
Then there are a lot of "cases". I have another sub which is assigned to a button which basically puts a checkmark in the cells of a selected range if they are visible and the issue is that even though the checkmarks appear, I can't get them to register as a "case" and thus launch the "BUILDER" code. After some reseach I'm sure it is because there is no target specified in my "selectvisible" code. So I can't Call/run/ etc the worksheet_selectionchange code since it doesn't know which targets. So how can I either specify my selection should equal targets? Or can I use something like if not isempty(selection) then select case selection.address?
Here is the code for the selectvisible:
Code:
Sub SelectVisible()
Range("A3:A4083").Select
selection.SpecialCells(xlCellTypeVisible).Select
selection.Formula = "=CHAR(252)"
selection.Value = selection.Value
With selection.Font
.Name = "Wingdings"
.FontStyle = "Bold"
.Size = 8
End With
PS- All Code is located in the Sheet1 Code.