Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Help with Macro

Hi,

I am new to macros and I need some help

I regularly have to change the reference style from x1A1 to x1R1C1 and back
again. So I made the following macro using Ctrl+Shift+T as the keyboard
short cut

Application.ReferenceStyle = xlR1C1
End Sub

Is there a way I can get it to toggle, i.e. each time I press Ctrl+Shift+T
it will change to other reference style, if I am in x1A1 it will change to
x1R1C1 and vice versa

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Help with Macro

This single statement will toggle between the two settings...

Application.ReferenceStyle = (xlR1C1 + xlA1) - Application.ReferenceStyle

--
Rick (MVP - Excel)


"Simon S" wrote in message
...
Hi,

I am new to macros and I need some help

I regularly have to change the reference style from x1A1 to x1R1C1 and
back
again. So I made the following macro using Ctrl+Shift+T as the keyboard
short cut

Application.ReferenceStyle = xlR1C1
End Sub

Is there a way I can get it to toggle, i.e. each time I press Ctrl+Shift+T
it will change to other reference style, if I am in x1A1 it will change to
x1R1C1 and vice versa

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Help with Macro

Rick, Great help, thanks

"Rick Rothstein" wrote:

This single statement will toggle between the two settings...

Application.ReferenceStyle = (xlR1C1 + xlA1) - Application.ReferenceStyle

--
Rick (MVP - Excel)


"Simon S" wrote in message
...
Hi,

I am new to macros and I need some help

I regularly have to change the reference style from x1A1 to x1R1C1 and
back
again. So I made the following macro using Ctrl+Shift+T as the keyboard
short cut

Application.ReferenceStyle = xlR1C1
End Sub

Is there a way I can get it to toggle, i.e. each time I press Ctrl+Shift+T
it will change to other reference style, if I am in x1A1 it will change to
x1R1C1 and vice versa

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default Help with Macro

That's a clever one :-)

"Rick Rothstein" wrote in message
...
This single statement will toggle between the two settings...

Application.ReferenceStyle = (xlR1C1 + xlA1) - Application.ReferenceStyle

--
Rick (MVP - Excel)


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
Macro to copy and paste values (columns)I have a macro file built C02C04 Excel Programming 2 May 2nd 08 01:51 PM
AutoRun Macro with a delay to give user the choice to cancel the macro wanderlust Excel Programming 2 September 28th 07 04:09 PM
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor [email protected] Excel Programming 2 March 30th 07 07:48 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 11:57 AM.

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"