LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default How to make macros work in both XL2003 and XL2010?!?

I'm experimenting with Ribbons in 2010, and apparrently I must create
the macro with '(Control As IRibbonControl)' to be able to call the
macro from a ribbon-button.

But this gives an a compile error in XL2003.

My quick test -macro is:

Sub Show_A1(Control As IRibbonControl)

If Range("A1").Value = "" Then
MsgBox "Cell A1 is empty!"
Else
MsgBox "Cell A1 = " & Range("A1").Value
End If

End Sub

How to make macros work in both XL2003 and XL2010 without compiler-error
in either???


CE

 
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
Make 2007 macros work in 2003 SoilSaver Excel Discussion (Misc queries) 2 May 9th 11 10:14 AM
Make 2 Macros Work as 1 Don Guillett Excel Programming 2 December 22nd 06 07:23 PM
how can i make macros to work when in tools, costumize and option. MOLECULA0_0 Excel Worksheet Functions 2 May 18th 06 04:54 AM
make macros (sub) work for add-in? [email protected] Excel Programming 2 December 30th 05 03:24 AM
How to make the macros work for different Excel versions? aiyer[_30_] Excel Programming 1 July 26th 04 12:52 PM


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

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"