Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Reading back a Read/Write Property

Usually, once I set a property like a cell's format:

Range("A1").NumberFormat = "@"

I don't need to "remember" it. I can just read it back with:

Dim s as String
s = Range("A1").NumberFormat

However, once I set a macro's shortcutkey:

Application.MacroOptions Macro:="Macro1", ShortcutKey:= "e"

The correct method to retrieve the property eludes me. I am looking for the
equivalent of:

s = MacroOptions.Macro("Macro1").ShortcutKey

(hopefully macros are part of the object model with read/write properties of
their own)
--
Gary''s Student - gsnu200757
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Reading back a Read/Write Property

On Nov 17, 4:05 pm, Gary''s Student
wrote:
Usually, once I set a property like a cell's format:

Range("A1").NumberFormat = "@"

I don't need to "remember" it. I can just read it back with:

Dim s as String
s = Range("A1").NumberFormat

However, once I set a macro's shortcutkey:

Application.MacroOptions Macro:="Macro1", ShortcutKey:= "e"

The correct method to retrieve the property eludes me. I am looking for the
equivalent of:

s = MacroOptions.Macro("Macro1").ShortcutKey

(hopefully macros are part of the object model with read/write properties of
their own)
--
Gary''s Student - gsnu200757


Hello Gary,

The setting of the shortcut key, or hot key as is sometimes called, is
actually performed by a couple of API calls. So, while you can set the
key, Excel does not provide any methods to read these settings back.
You write an API macro to do this, if really need it.

Sincerely,
Leith Ross
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Reading back a Read/Write Property

Still same way as I suggested to you last time :-)

http://tinyurl.com/2qxjmx

Regards,
Peter T


"Gary''s Student" wrote in message
...
Usually, once I set a property like a cell's format:

Range("A1").NumberFormat = "@"

I don't need to "remember" it. I can just read it back with:

Dim s as String
s = Range("A1").NumberFormat

However, once I set a macro's shortcutkey:

Application.MacroOptions Macro:="Macro1", ShortcutKey:= "e"

The correct method to retrieve the property eludes me. I am looking for

the
equivalent of:

s = MacroOptions.Macro("Macro1").ShortcutKey

(hopefully macros are part of the object model with read/write properties

of
their own)
--
Gary''s Student - gsnu200757



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
I have a read only xl file, I need it to be read and write drama queen Excel Discussion (Misc queries) 3 July 1st 06 12:25 AM
How can a file be converted from Read-Only to Read/Write Jim in Apopka Excel Discussion (Misc queries) 2 November 19th 05 04:59 PM
Write value to an Excel VBA variable by reading Access DB? Alan Ibbotson Excel Programming 1 July 12th 05 12:07 AM
OLAP write back via formulas (functions), not read only pivot tab BISability Excel Worksheet Functions 0 November 18th 04 04:15 AM
How to read a SQL Table into Excel change the data and write back into SQL Belinda Excel Programming 1 June 10th 04 10:18 AM


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

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

About Us

"It's about Microsoft Excel"