ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help me understand this code (https://www.excelbanter.com/excel-discussion-misc-queries/50221-help-me-understand-code.html)

Carrot

Help me understand this code
 

Hi everyone,

A coworker came to me with an Excel sheet with dropdown controls on it.
She wanted the dropdown control to not be visible when the sheet is
printed, while the selected data in the dropdown still be printed. Easy
enough, I thought, just gotta change the combobox properties.

Turns out it wasn't quite that easy. The dropdowns seem to be created
with something that vaguely resembles XML, but isn't quite that,
either. As far as I can tell, this is the code that creates the
dropdown:


Code:
--------------------
<v:shape id="_x0000_s1186" type="#_x0000_t201" style='position:absolute;
margin-left:.75pt;margin-top:99.75pt;width:52.5pt;height:15.75pt;z-index:42'
stroked="f" strokecolor="windowText [64]" o:insetmode="auto"
<o:lock v:ext="edit" rotation="t" text="t"/
<![if excel]<x:ClientData ObjectType="Drop"
<x:SizeWithCells/
<x:AutoLineFalse</x:AutoLine
<x:FmlaLink$AB$45</x:FmlaLink
<x:Val0</x:Val
<x:Min0</x:Min
<x:Max22</x:Max
<x:Inc1</x:Inc
<x:Page8</x:Page
<x:Dx15</x:Dx
<x:FmlaRange$AA$17:$AA$46</x:FmlaRange
<x:Sel0</x:Sel
<x:SelTypeSingle</x:SelType
<x:LCTNormal</x:LCT
<x:DropStyleCombo</x:DropStyle
<x:DropLines8</x:DropLines
</x:ClientData
<![endif]</v:shape
--------------------


So, what the heck is this? I've had a look at the MS Office XML schema
reference, but I can't find anything that looks like this. Of course,
any hint on how I can hide the control when the sheet is printed would
be really helpful, too. :)

Cheers!


--
Carrot
------------------------------------------------------------------------
Carrot's Profile: http://www.excelforum.com/member.php...o&userid=28073
View this thread: http://www.excelforum.com/showthread...hreadid=475818


comotoman


Try this:

Right click the combo box, 'Format Control', 'Properties' tab, and in
the bottum left is a box to 'Print Object' Deselcet it.

Let me know....


--
comotoman
------------------------------------------------------------------------
comotoman's Profile: http://www.excelforum.com/member.php...o&userid=27292
View this thread: http://www.excelforum.com/showthread...hreadid=475818


Carrot


Thanks, but I tried that. The control and its contents are not printed,
but I want the content (i.e. the selected item in the combo) to be
printed. I'm looking for something similar to the combobox property
ShowDropButtonWhen, which I could set to fmShowDropButtonWhenFocus.


--
Carrot
------------------------------------------------------------------------
Carrot's Profile: http://www.excelforum.com/member.php...o&userid=28073
View this thread: http://www.excelforum.com/showthread...hreadid=475818



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

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