enum

  1. Mackeral

    Defined Enum's used in Function Calls don't seem to work anymore. Has something changed?

    This an example of an Enum definitionEnum XXX X1 = 1 X2 = 2 End Enum I will define a function I will call "TestFunction Test(Arg as XXX) ' Some Code End Function When I type in Call Test(all I see isTest:Display as XXX)and no drop-down list appears where I use to see a Dropdown...
  2. N

    Variable in VBA7

    Hello, I share a lot of generic code between my projects I load a module and it "speaks" immediately with other modules, enum's and type's... sometimes some specific module/enum/type is not on the workbook and I need to comment out a lots of line of code, so I thought to use some kind of...
  3. S

    32 to 64bit code.

    I have this piece of code that I've used from someone else on here. One problem....It works for 32bit systems but not 64. How would I "convert" this to work on both? Thanks Option Explicit Enum W32_Window_State Show_Normal = 1 Show_Minimized = 2 Show_Maximized = 3...
  4. A

    Using Enum

    I have a list of strings and numbers that go with them. I'm sending the string to a Function to return the Number and was using Select Case but have an idea there's something better. I tried Enum. Can I use the variable name though, or must be a literal ?
  5. D

    VBReplace Procedure and Enum

    Good day All Code below handle only procedure, how to use it replace Enum string "Level" "LVL" ? THX. Option Explicit Public Enum SecurityLevelp IllegalEntry = 0 SecurityLevel1 = 1 SecurityLevel2 = 8 SecurityLevel3 SecurityLevel4 = 10 End Enum Public Sub SecurityLevel() Cells.Clear [A1] =...
  6. D

    Get Enum string Value

    below code have compile Error: GetType(flavorEnum) Public Enum flavorEnum salty sweet sour bitter End Enum Private Sub TestMethod() MsgBox ("The strings in the flavorEnum are:") Dim i As String For Each i In [Enum].GetNames(GetType(flavorEnum)) MsgBox (i) Next End Sub
  7. P

    Retrieve Enum Variable Names using Enum Values

    I would like to use the values declared in the Enum section and get the names of those variables. Private Enum Bks [_First] = 0 English = 0 Maths = 1 Science = 2 [_Last] = 2 End Enum Dim MyBooks(2) As Boolean Private Sub cmdEnumTrial_Click() Dim ChosenBooks As String Dim Runr As...
  8. M

    VBA: Global eNum / Variables or Constants?

    Dear all The workbook I am working with is set to be used with userforms only; there are around 20 of them. I have a number of variables of type byte which are repeatedly used in userforms. Is it a good idea to create global variables, global constants or enum whose values are set when the...
  9. T

    Change Column Items Based on Multiple Criteria (VBA)

    Hi all, I have two columns of data, CLS and CDS, both of which contain 14365 items. In column CLS these items are labelled either A, B, C, E, F, G, L, R, S, T. In column CDS the items are grouped into two categories X or Y. Here's the issue: The 1 or 2 categorization is only relevant for CLS...
  10. S

    define enums and use in calculation

    I've defined a text dropdown list in two cells but don't know how to enumerate them (and non-contigiously) and then multiply them together in a calculation. Can anyone help please?

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