ClimoC
Well-known Member
- Joined
- Aug 21, 2009
- Messages
- 584
Alright Gurus...?
Just wondering if anyone's aware of a way, through the API or something, so supply an 'Answer' to a prompt that appears?
For reasons I won't get into, a script I write merges cells. But, based on certain conditions, sometimes I don't want it to Merge.
Whilst I can obviously DisplayAlerts=False to always say 'Yes' to Merging cells, is there a way to say 'No' to Merging cells based on the warning? The warning I am trying to respond to is the 'Merging cells will replace the contents of blah blah'
Plus there's also an Intersect that has to be true before it will allow Merging Cells.
I don't REALLY want to have to test the 3-5 conditions necessary to then choose whether to Merge or not... My operations will want to Merge EG 6 blank cells (in a single column) into one and populate data in it, but if one of the ranges is already part of a merged range, then I DON'T want to.
I can test for "Err.Description = "Unable to set the MerceCells property of the Range Class" and act upon that, but to GET that error, you have to manually click 'No' when prompted that merging your range will overwrite some existing values.
It's all part of a Beast of a custom GUI in a Workbook that's more Application than it is Workbook.
Any suggestions would be most welcome
Cheers
C
Just wondering if anyone's aware of a way, through the API or something, so supply an 'Answer' to a prompt that appears?
For reasons I won't get into, a script I write merges cells. But, based on certain conditions, sometimes I don't want it to Merge.
Whilst I can obviously DisplayAlerts=False to always say 'Yes' to Merging cells, is there a way to say 'No' to Merging cells based on the warning? The warning I am trying to respond to is the 'Merging cells will replace the contents of blah blah'
Plus there's also an Intersect that has to be true before it will allow Merging Cells.
I don't REALLY want to have to test the 3-5 conditions necessary to then choose whether to Merge or not... My operations will want to Merge EG 6 blank cells (in a single column) into one and populate data in it, but if one of the ranges is already part of a merged range, then I DON'T want to.
I can test for "Err.Description = "Unable to set the MerceCells property of the Range Class" and act upon that, but to GET that error, you have to manually click 'No' when prompted that merging your range will overwrite some existing values.
It's all part of a Beast of a custom GUI in a Workbook that's more Application than it is Workbook.
Any suggestions would be most welcome
Cheers
C