Consulting

Results 1 to 2 of 2

Thread: Declare Publicly

  1. #1
    VBAX Master
    Joined
    Jun 2006
    Posts
    1,091
    Location

    Declare Publicly

    How do I declare these publicly:

    [vba]'Set Variables
    Dim WB As Workbook, Detail As Worksheet, Cust As Worksheet, Prod As Worksheet
    Dim rngFind As Range, MyInput As String
    Set WB = ActiveWorkbook
    Set Detail = WB.ActiveSheet
    [/vba]

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Public WB As Workbook
    Public Detail As Worksheet
    'etc.

    Sub MyMacro()
    ...

    End SUb
    [/vba]

Posting Permissions

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