SUBNM Double-click

Post Reply
Michael Barker
Posts: 20
Joined: Fri May 11, 2012 9:57 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

SUBNM Double-click

Post by Michael Barker »

Hi to all,

I have created a slice, the usual set-up followed in Excel. To change the specific dimension, you double-click on the element (with the SUBNM formula), and the dimension window pops up.

Is it possible in VBA to make the dimension window open without a double-click, but with a single click?

Thanks in advance.
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: SUBNM Double-click

Post by Duncan P »

One option is to create a cell in a cube of the model that has a picklist defined on it with the dimension members you want them to choose from. Then replace the SUBNM with a DBRW on that cell. Both Excel and WebSheets will put a drop-down against the cell.

This is fine for simple short dimensions as it displays as a simple drop-down instead of the selection dialogue you get with SUBNM. However if your dimension is long or if you want to see the structure it won't be good.
Paul Segal
Community Contributor
Posts: 312
Joined: Mon May 12, 2008 8:11 am
OLAP Product: TM1
Version: TM1 11 and up
Excel Version: Too many to count

Re: SUBNM Double-click

Post by Paul Segal »

This code works for me. It needs to go in the worksheet object, and you need to replace the range (or do something cleverer with it).

Code: Select all

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("B2")) Is Nothing Then
          Application.Run "TWEVENTER1"
   End If
End Sub
See http://www.tm1forum.com/viewtopic.php?f=21&t=6424 for more detail.
Paul
Wim Gielis
MVP
Posts: 3233
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: SUBNM Double-click

Post by Wim Gielis »

As an alternative, you could use the E_PICK macro function.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Michael Barker
Posts: 20
Joined: Fri May 11, 2012 9:57 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

Re: SUBNM Double-click

Post by Michael Barker »

Thanks very much.

Application.Run "TWEVENTER1" works fantastically.
Post Reply