Results 1 to 10 of 186

Thread: Appendix Thread 2. ( Codes for other Threads, HTML Tables, etc.)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,410
    Rep Power
    10
    Some extra notes for these main forum posts
    https://www.excelfox.com/forum/showt...ll=1#post24163
    https://www.excelfox.com/forum/showt...age3#post24163
    https://eileenslounge.com/viewtopic....317547#p317547
    https://eileenslounge.com/viewtopic....317533#p317533


    This is the original coding from SamPi , which confused me a bit for a few reasons
    The choice of variable names;
    the use of a .xlam file; ( and
    the Class module is only part of the story
    )


    Class Module:
    Code:
    Option Explicit
     
    Public WithEvents App As Application
     
    Private Sub App_WorkbookOpen(ByVal Wb As Workbook)
    Dim s As String
    
    s = Wb.Name
    
    If s = "test.csv" Then MyMacro
    
    End Sub
    
    Sub MyMacro()
    MsgBox "Yes"
    End Sub
    
    ThisWorkbook:
    Code:
    Option Explicit
    
    Dim App             As New App
     
    Private Sub Workbook_Open()
         
       Set App.App = Application
    
    End Sub
    
    Attached Files Attached Files
    Last edited by DocAElstein; 05-22-2024 at 10:07 PM.

Similar Threads

  1. VBA to Reply All To Latest Email Thread
    By pkearney10 in forum Outlook Help
    Replies: 11
    Last Post: 12-22-2020, 11:15 PM
  2. Appendix Thread. Diet Protokol Coding Adaptions
    By DocAElstein in forum Test Area
    Replies: 6
    Last Post: 09-05-2019, 10:45 AM
  3. Replies: 19
    Last Post: 04-20-2019, 02:38 PM
  4. Search List of my codes
    By PcMax in forum Excel Help
    Replies: 6
    Last Post: 08-03-2014, 08:38 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
  •