ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   a "cell is renamed" event? (https://www.excelbanter.com/excel-programming/372956-cell-renamed-event.html)

travis[_3_]

a "cell is renamed" event?
 
I have an application where I'd like to execute code every time a cell
is named via the name box.

When the cell is named, I want a popup dialog asking if I would like to
add the named cell to the list of cells to be imported/exported by a
sub which pulls data from an older version of the spreadsheet into a
newer one.

If the user says "yes", I want the name of the newly named cell to be
added to this list, which resides in a sheet within the spreadsheet.
If not, don't add it to the list.

So I'm trying to figure out if there is an event triggered by changing
a cell or range's name?

Travis


Nigel

a "cell is renamed" event?
 
There is no such an event!

--
Cheers
Nigel



"travis" wrote in message
ups.com...
I have an application where I'd like to execute code every time a cell
is named via the name box.

When the cell is named, I want a popup dialog asking if I would like to
add the named cell to the list of cells to be imported/exported by a
sub which pulls data from an older version of the spreadsheet into a
newer one.

If the user says "yes", I want the name of the newly named cell to be
added to this list, which resides in a sheet within the spreadsheet.
If not, don't add it to the list.

So I'm trying to figure out if there is an event triggered by changing
a cell or range's name?

Travis




Jim Thomlinson

a "cell is renamed" event?
 
There is no such event... back to the drawing board on that idea...
--
HTH...

Jim Thomlinson


"travis" wrote:

I have an application where I'd like to execute code every time a cell
is named via the name box.

When the cell is named, I want a popup dialog asking if I would like to
add the named cell to the list of cells to be imported/exported by a
sub which pulls data from an older version of the spreadsheet into a
newer one.

If the user says "yes", I want the name of the newly named cell to be
added to this list, which resides in a sheet within the spreadsheet.
If not, don't add it to the list.

So I'm trying to figure out if there is an event triggered by changing
a cell or range's name?

Travis



NickHK

a "cell is renamed" event?
 
As others have said there is no such event.
However, that Name combo does have a handle, that you can get with
FindWindow/FindWindowEx.
Once you have that, you can subclass it and see when it changes and react
accordingly.
This process seems somewhat flakey in Excel, but it may work.

Why not give the user a "Name and Add to List" button/menu choice.
Then you can control it.
If they use Excel's name combo, it means that do not want your
functionality.

NickHK

"travis" wrote in message
ups.com...
I have an application where I'd like to execute code every time a cell
is named via the name box.

When the cell is named, I want a popup dialog asking if I would like to
add the named cell to the list of cells to be imported/exported by a
sub which pulls data from an older version of the spreadsheet into a
newer one.

If the user says "yes", I want the name of the newly named cell to be
added to this list, which resides in a sheet within the spreadsheet.
If not, don't add it to the list.

So I'm trying to figure out if there is an event triggered by changing
a cell or range's name?

Travis




Bob Phillips

a "cell is renamed" event?
 
Another option, get hold of Jan Karel Pieterse's NameManager, it provides
*similar) functionality, although not under your control

It is a free add-in, and you can get it at
http://www.jkp-ads.com/OfficeMarketPlaceNM-EN.asp

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"travis" wrote in message
ups.com...
I have an application where I'd like to execute code every time a cell
is named via the name box.

When the cell is named, I want a popup dialog asking if I would like to
add the named cell to the list of cells to be imported/exported by a
sub which pulls data from an older version of the spreadsheet into a
newer one.

If the user says "yes", I want the name of the newly named cell to be
added to this list, which resides in a sheet within the spreadsheet.
If not, don't add it to the list.

So I'm trying to figure out if there is an event triggered by changing
a cell or range's name?

Travis




travis[_3_]

a "cell is renamed" event?
 

Bob Phillips wrote:
Another option, get hold of Jan Karel Pieterse's NameManager, it provides
*similar) functionality, although not under your control

It is a free add-in, and you can get it at
http://www.jkp-ads.com/OfficeMarketPlaceNM-EN.asp


Thanks for the link Bob, while it doesn't seem to do quite what I
wanted it to do for this particular app, I've installed it and loaded
up one of my more complex spreadsheets, I can see it will come in very
handy.

Travis


Bob Phillips

a "cell is renamed" event?
 
I agree, I only started using it recently in an app with hundreds of names,
and I love it.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"travis" wrote in message
oups.com...

Bob Phillips wrote:
Another option, get hold of Jan Karel Pieterse's NameManager, it

provides
*similar) functionality, although not under your control

It is a free add-in, and you can get it at
http://www.jkp-ads.com/OfficeMarketPlaceNM-EN.asp


Thanks for the link Bob, while it doesn't seem to do quite what I
wanted it to do for this particular app, I've installed it and loaded
up one of my more complex spreadsheets, I can see it will come in very
handy.

Travis





All times are GMT +1. The time now is 10:13 AM.

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