GetType Operator in VBA

SebPostic

New Member
Joined
Feb 6, 2014
Messages
2
Hi,

I am trying to format a graph, with a user input as a text file. So I parse the string which contains the graph's desired patterns, and retrieve bits such as "msopattern10Percent" - but typed as String.

I would like to convert those strings to MsoPatternType type, and I've came across the [Enum].Parse(Type, String) function which does just that.

Problem, I have to provide the final type required. All that I found is a Visual Basic Operator, GetType, but it is not recognized by VBA. Is there a specific library I have to load? Is there another reason to that?

Thank you very much for your advice!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
You could put them in a dictionary or collection and retrieve the value by name.
 
Upvote 0

Forum statistics

Threads
1,203,457
Messages
6,055,546
Members
444,795
Latest member
cjohnson333

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top