ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Follow up from Bob Phillips' Answer on Programatically Making Chec (https://www.excelbanter.com/excel-programming/329325-follow-up-bob-phillips-answer-programatically-making-chec.html)

David

Follow up from Bob Phillips' Answer on Programatically Making Chec
 
Hi Everyone.

Previous Thread - On Change (Checkboxes) or something similar

Bob was thoughtful enough to provide me with a solution to my problem with
checkboxes...However, today I began to experience another problem
all-together.

A section of my code is shown below:

With ActiveSheet
.CheckBoxes.Add(.Range(CellRef).Left, Range(CellRef).Top - 1.5, 0,
12.75).Select
Selection.OnAction = "SpreadBoxes"
Selection.Caption = ""
Selection.LinkedCell = CellRef
End With

The weird thing is that this code worked fine yesterday, but then today when
I tried to use it again the Selection.OnAction ="SpreadBoxes";
Selection.Capiton and Selection.LinkedCell ALL return the error "Object
doesn't support this property or method."

What could cause such an error? Can anyone provide any guidance? I actually
rewrote the whole subroutine this morning to try and figure it out, but had
no luck to speak of.

Thanks in advance for any help, and thanks again to Bob for his help
yesterday.

David

David

Follow up from Bob Phillips' Answer on Programatically Making Chec
 
Amazing...I spent a few hours on this already today, but only just realized
what the problem is.

That is: it was my worksheet changed handler that was causing the problem.
If I disable it, everything works perfectly.

Sorry to waste your time if you read the previous message, but I guess
writing down the problem made me think it HAD to be something specific to the
workbook.

This newsgroup is great, you all are so very helpful.

David

"David" wrote:

Hi Everyone.

Previous Thread - On Change (Checkboxes) or something similar

Bob was thoughtful enough to provide me with a solution to my problem with
checkboxes...However, today I began to experience another problem
all-together.

A section of my code is shown below:

With ActiveSheet
.CheckBoxes.Add(.Range(CellRef).Left, Range(CellRef).Top - 1.5, 0,
12.75).Select
Selection.OnAction = "SpreadBoxes"
Selection.Caption = ""
Selection.LinkedCell = CellRef
End With

The weird thing is that this code worked fine yesterday, but then today when
I tried to use it again the Selection.OnAction ="SpreadBoxes";
Selection.Capiton and Selection.LinkedCell ALL return the error "Object
doesn't support this property or method."

What could cause such an error? Can anyone provide any guidance? I actually
rewrote the whole subroutine this morning to try and figure it out, but had
no luck to speak of.

Thanks in advance for any help, and thanks again to Bob for his help
yesterday.

David


Bob Phillips[_7_]

Follow up from Bob Phillips' Answer on Programatically Making Chec
 
David,

What does the change handler do?

--
HTH

Bob Phillips

"David" wrote in message
...
Amazing...I spent a few hours on this already today, but only just

realized
what the problem is.

That is: it was my worksheet changed handler that was causing the problem.
If I disable it, everything works perfectly.

Sorry to waste your time if you read the previous message, but I guess
writing down the problem made me think it HAD to be something specific to

the
workbook.

This newsgroup is great, you all are so very helpful.

David

"David" wrote:

Hi Everyone.

Previous Thread - On Change (Checkboxes) or something similar

Bob was thoughtful enough to provide me with a solution to my problem

with
checkboxes...However, today I began to experience another problem
all-together.

A section of my code is shown below:

With ActiveSheet
.CheckBoxes.Add(.Range(CellRef).Left, Range(CellRef).Top - 1.5, 0,
12.75).Select
Selection.OnAction = "SpreadBoxes"
Selection.Caption = ""
Selection.LinkedCell = CellRef
End With

The weird thing is that this code worked fine yesterday, but then today

when
I tried to use it again the Selection.OnAction ="SpreadBoxes";
Selection.Capiton and Selection.LinkedCell ALL return the error "Object
doesn't support this property or method."

What could cause such an error? Can anyone provide any guidance? I

actually
rewrote the whole subroutine this morning to try and figure it out, but

had
no luck to speak of.

Thanks in advance for any help, and thanks again to Bob for his help
yesterday.

David





All times are GMT +1. The time now is 05:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com