Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Stop Highlighting a Range

Hi,

I'm writing a macro that will improve on Excel's graph
plotting routine by automating some of the steps. As part
of it I would like to have the user select a row by
clicking on it.

No problem - I can do that:

Set activecell_position = Application.InputBox
(prompt:="Input desired active cell position",
title:="Active Cell Position",
Default:=ActiveCell.Address, Type:=8)

but what I would like to do is to prevent a range of cells
being highlighted accidentally.
ok, I know its still the active cell address that's read
in - but I want to prevent the highlighting of the range
in the first place.

Thks....Chris

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Stop Highlighting a Range

Set activecell_position = Application.InputBox
(prompt:="Input desired active cell position",
title:="Active Cell Position",
Default:=ActiveCell.Address, Type:=8)

set ActiveCell_position = activeCell_Position(1,1)

--
Regards,
Tom Ogilvy

Chris Gorham wrote in message
...
Hi,

I'm writing a macro that will improve on Excel's graph
plotting routine by automating some of the steps. As part
of it I would like to have the user select a row by
clicking on it.

No problem - I can do that:

Set activecell_position = Application.InputBox
(prompt:="Input desired active cell position",
title:="Active Cell Position",
Default:=ActiveCell.Address, Type:=8)

but what I would like to do is to prevent a range of cells
being highlighted accidentally.
ok, I know its still the active cell address that's read
in - but I want to prevent the highlighting of the range
in the first place.

Thks....Chris



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Stop Highlighting a Range

Sorry Tom,

still doesn't do what I want....
in the Input Box you can still drag across a range...yes I
know that the active cell is still read in correctly, but
I'm trying to prevent the user from selecting a range when
he doesn't need to. My macro will read in the information
from the range automatically - all he has to do is "click"
on the row that contains it, not highlight the range where
the info is contained...

Thks...Chris

-----Original Message-----
Set activecell_position = Application.InputBox
(prompt:="Input desired active cell position",
title:="Active Cell Position",
Default:=ActiveCell.Address, Type:=8)

set ActiveCell_position = activeCell_Position(1,1)

--
Regards,
Tom Ogilvy

Chris Gorham wrote

in message
...
Hi,

I'm writing a macro that will improve on Excel's graph
plotting routine by automating some of the steps. As

part
of it I would like to have the user select a row by
clicking on it.

No problem - I can do that:

Set activecell_position = Application.InputBox
(prompt:="Input desired active cell position",
title:="Active Cell Position",
Default:=ActiveCell.Address, Type:=8)

but what I would like to do is to prevent a range of

cells
being highlighted accidentally.
ok, I know its still the active cell address that's read
in - but I want to prevent the highlighting of the range
in the first place.

Thks....Chris



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Stop Highlighting a Range

Unless you want to protect the worksheet and restrict the ability to select
to a single column or certain set of cells, there would be no way of
restricting the user to what can be selected. You just have to adjust to
what is selected and acertain the user's intent in the context of what you
asked for. You could certainly reject any selection that was greater than
one cell and put the inputbox back up with a chastising message.

--
Regards,
Tom Ogilvy


Chris Gorham wrote in message
...
Sorry Tom,

still doesn't do what I want....
in the Input Box you can still drag across a range...yes I
know that the active cell is still read in correctly, but
I'm trying to prevent the user from selecting a range when
he doesn't need to. My macro will read in the information
from the range automatically - all he has to do is "click"
on the row that contains it, not highlight the range where
the info is contained...

Thks...Chris

-----Original Message-----
Set activecell_position = Application.InputBox
(prompt:="Input desired active cell position",
title:="Active Cell Position",
Default:=ActiveCell.Address, Type:=8)

set ActiveCell_position = activeCell_Position(1,1)

--
Regards,
Tom Ogilvy

Chris Gorham wrote

in message
...
Hi,

I'm writing a macro that will improve on Excel's graph
plotting routine by automating some of the steps. As

part
of it I would like to have the user select a row by
clicking on it.

No problem - I can do that:

Set activecell_position = Application.InputBox
(prompt:="Input desired active cell position",
title:="Active Cell Position",
Default:=ActiveCell.Address, Type:=8)

but what I would like to do is to prevent a range of

cells
being highlighted accidentally.
ok, I know its still the active cell address that's read
in - but I want to prevent the highlighting of the range
in the first place.

Thks....Chris



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Stop Highlighting a Range

Just an added thought - selecting with the inputbox does not change the
current selection/activecell - you seem to keep insinuating that it does.
...yes I
know that the active cell is still read in correctly,


There is no ActiveCell associated with making a selection using the
Application.InputBox. The default is the current selection, but then there
would be no reason to put up the inputbox if that is what you wanted.

--
Regards,
Tom Ogilvy


Chris Gorham wrote in message
...
Sorry Tom,

still doesn't do what I want....
in the Input Box you can still drag across a range...yes I
know that the active cell is still read in correctly, but
I'm trying to prevent the user from selecting a range when
he doesn't need to. My macro will read in the information
from the range automatically - all he has to do is "click"
on the row that contains it, not highlight the range where
the info is contained...

Thks...Chris

-----Original Message-----
Set activecell_position = Application.InputBox
(prompt:="Input desired active cell position",
title:="Active Cell Position",
Default:=ActiveCell.Address, Type:=8)

set ActiveCell_position = activeCell_Position(1,1)

--
Regards,
Tom Ogilvy

Chris Gorham wrote

in message
...
Hi,

I'm writing a macro that will improve on Excel's graph
plotting routine by automating some of the steps. As

part
of it I would like to have the user select a row by
clicking on it.

No problem - I can do that:

Set activecell_position = Application.InputBox
(prompt:="Input desired active cell position",
title:="Active Cell Position",
Default:=ActiveCell.Address, Type:=8)

but what I would like to do is to prevent a range of

cells
being highlighted accidentally.
ok, I know its still the active cell address that's read
in - but I want to prevent the highlighting of the range
in the first place.

Thks....Chris



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
STOP Highlighting Multiple Cells Ken the Engineer Excel Discussion (Misc queries) 4 April 6th 12 06:56 PM
Excel won't stop highlighting (Dec 06) [email protected] Excel Discussion (Misc queries) 2 December 13th 06 09:59 PM
Excel won't stop highlighting Stauffer Guy Excel Discussion (Misc queries) 3 July 31st 06 06:16 AM
stop highlighting cells when launched staceyb Excel Discussion (Misc queries) 1 June 27th 05 03:52 AM
Cells in Excel will not stop highlighting Boe Excel Discussion (Misc queries) 3 June 14th 05 03:53 PM


All times are GMT +1. The time now is 06:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"