myvar1

  1. J

    Best way to declare variables for use in all modules?

    Hi, As title, I'm unsure of the correct way to do this as I've seen a few ways. On workbook open ? Public / Const? Example: myVar1 = Sheets("Sheet1").Range("A1").value How can I use myVar1 in all macros without any further declaration Any info appreciated
  2. J

    Pass variable from Private Sub Worksheet_SelectionChange to a Module ?

    Hi, having trouble figuring this out, i have the following sheet code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Range("Z2:Z50")) Is Nothing Then If Target.Offset(0, 1).Value = Target.Offset(0, 2).Value Then 'do...
  3. kelly mort

    Multiple InputBox Then Split Result Into Cells

    Hello, I came up with this code and I am stacked here as to what I wanna achieve. I need 8 variables; what I have here is just two of those. They are assigned by the inputbox, then after that send them to my worksheet by breaking the input into two where the comma appears in the user input...
  4. T

    Object variable or With block variable not set

    Standard module: Dim MyVar(1 To 10, 1 To 10) As MyClass Set MyVar(1 To 10, 1 To 10) = New MyClass MyVar(1, 1).Category = "Some category" MyVar(2, 1).Fruit = "Some fruit" MyClass: Private pCategory As Variant Private pFruit As Variant Public Property Get Category() As Variant...

Some videos you may like

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top