ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   vB Help (https://www.excelbanter.com/excel-discussion-misc-queries/220280-vbulletin-help.html)

Gunti

vB Help
 
Hi,
I'm getting pretty frustrated here. I need something extremely simple and i
just can't get it done.

This is what i want.

The vB event is change. Whenever a range of cells changes i want the code to
check if it is < 0.

If it is, i want it to remove a cross which is standard on my sheet.
If it isn't, it should create the cross for future use.

Some more info:
Sheetname: Invulblad

Code by recording creating the cross with macro recorder:

ActiveSheet.Shapes.AddLine(31.5, 858.75, 607.5, 1077.75).Select
Selection.ShapeRange.Flip msoFlipVertical
ActiveSheet.Shapes.AddLine(30.75, 858.75, 607.5, 1077.75).Select

Ofcourse i want this without .Select. So i probably want to give both lines
a name.

I only need help with removing & adding the cross.

Any help appreciated, seeing as i'm not experienced in vB a code would be
welcome - i could analyse this to learn it myself (been busy figuring this
out for an hour or two now)

Greets & Thanks,
Gunti


Bob Phillips[_3_]

vB Help
 
What is that shape, is it a cross to indicate a value is < 0? If so, a
better way is to just use X surely, text values.

--
__________________________________
HTH

Bob

"Gunti" wrote in message
...
Hi,
I'm getting pretty frustrated here. I need something extremely simple and
i
just can't get it done.

This is what i want.

The vB event is change. Whenever a range of cells changes i want the code
to
check if it is < 0.

If it is, i want it to remove a cross which is standard on my sheet.
If it isn't, it should create the cross for future use.

Some more info:
Sheetname: Invulblad

Code by recording creating the cross with macro recorder:

ActiveSheet.Shapes.AddLine(31.5, 858.75, 607.5, 1077.75).Select
Selection.ShapeRange.Flip msoFlipVertical
ActiveSheet.Shapes.AddLine(30.75, 858.75, 607.5, 1077.75).Select

Ofcourse i want this without .Select. So i probably want to give both
lines
a name.

I only need help with removing & adding the cross.

Any help appreciated, seeing as i'm not experienced in vB a code would be
welcome - i could analyse this to learn it myself (been busy figuring
this
out for an hour or two now)

Greets & Thanks,
Gunti




Gunti

vB Help
 
No, it's actually a big cross (big as in the width of the screen) covering an
area. The way you're suggesting will not work.

Thanks for replying though,
Gunti

"Bob Phillips" wrote:

What is that shape, is it a cross to indicate a value is < 0? If so, a
better way is to just use X surely, text values.

--
__________________________________
HTH

Bob

"Gunti" wrote in message
...
Hi,
I'm getting pretty frustrated here. I need something extremely simple and
i
just can't get it done.

This is what i want.

The vB event is change. Whenever a range of cells changes i want the code
to
check if it is < 0.

If it is, i want it to remove a cross which is standard on my sheet.
If it isn't, it should create the cross for future use.

Some more info:
Sheetname: Invulblad

Code by recording creating the cross with macro recorder:

ActiveSheet.Shapes.AddLine(31.5, 858.75, 607.5, 1077.75).Select
Selection.ShapeRange.Flip msoFlipVertical
ActiveSheet.Shapes.AddLine(30.75, 858.75, 607.5, 1077.75).Select

Ofcourse i want this without .Select. So i probably want to give both
lines
a name.

I only need help with removing & adding the cross.

Any help appreciated, seeing as i'm not experienced in vB a code would be
welcome - i could analyse this to learn it myself (been busy figuring
this
out for an hour or two now)

Greets & Thanks,
Gunti






All times are GMT +1. The time now is 02:56 AM.

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