Results 1 to 10 of 540

Thread: Appendix Thread. App Index Rws() Clms() Majic code line Codings for other Threads, Tables etc) TEST COPY

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #19
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    In support of this main Forum post:
    http://www.eileenslounge.com/viewtop...297074#p297074 http://http://www.eileenslounge.com/viewtop...297074#p297074
    Second simplified Solution

    I think in the first solution I made initially a mistake in trying to set the pseudo public variables, *** and so went off in a tangent using the Application.Run stuff. You don’t need any of that and can forget the two macros that fill the variables as well.

    You just need this

    Worksheet code module, Sheet1 ( in PurseWayDoughPublicVariables.xls )
    Code:
     Public C1 As String
    Workbook code module, ThisWorkbook ( in PurseWayDoughPublicVariables.xls )
    Code:
     Public C2 As String

    And then the other macros are like

    Code:
    Private Sub CommandButton1_Click()
        Select Case Me.CheckBox1
         Case True
          'C1 = "yes"
                                              '  Application.Run Macro:="'" & ThisWorkbook.Path & "\" & "PurseWayDoughPublicVariables.xls'!Sheet1.PhilC1", Arg1:="Yus"
         Let Workbooks("PurseWayDoughPublicVariables.xls").Worksheets("Sheet1").C1 = "Yus"
        End Select
        Select Case Me.CheckBox2
         Case True
          'C2 = "yes"
                                              '  Application.Run Macro:="'" & ThisWorkbook.Path & "\" & "PurseWayDoughPublicVariables.xls'!ThisWorkbook.PhilC2", Arg1:="Ja"
         Let Workbooks("PurseWayDoughPublicVariables.xls").C2 = "Ja"
        End Select
     Unload Me
     Call Sheet2.Fi_l
    End Sub
    
    Code:
    Sub Fi_l()
        'Act_ive
     'Let Range("A2").Resize(10).Value = C1
     Let Range("A2").Resize(10).Value = Workbooks("PurseWayDoughPublicVariables.xls").Worksheets("Sheet1").C1
     'let Range("B2").Resize(10).Value = C2
     Let Range("B2").Resize(10).Value = Workbooks("PurseWayDoughPublicVariables.xls").C2
    End Sub
    Attached Files Attached Files

Similar Threads

  1. Replies: 192
    Last Post: 08-30-2025, 01:34 AM
  2. Replies: 541
    Last Post: 07-18-2025, 04:08 PM
  3. Replies: 3
    Last Post: 03-07-2022, 05:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •