title: run addin macro on open workbook
body: <p>I have seen where you can run a macro based on inserted text, but the macro has to be embedded in the sheet, i.e., <code>Private Sub Worksheet_Change(ByVal Target As Range)</code>.</p>
  
  <p>What I want to do is call the macro from my add-in from a user's workbook that will not have "Worksheet_Change..." already embedded at the sheet level. Is there a way to do this?</p>
  
  <p>As for additional background, I know I can run the macro from the add in, but I want to activate it using a bar-code scan rather than calling the macro from a button or some other interface.</p>
  
  <p>My bar-code reads as <code>Make Landscape 1 pg</code> when scanned. Hoping to use some modification of this:</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
      If (Target.Value) = "Make Landscape 1 pg" Then
     With Application
          .EnableEvents = False
          .Undo
          .EnableEvents = True
      End With
      Application.ScreenUpdating = False
          'ActiveWindow.SelectedSheets.PrintPreview
          ActiveSheet.Select
          With ActiveSheet.PageSetup
              .Orientation = xlLandscape
              .FitToPagesWide = 1
              .FitToPagesTall = 1
          End With
          Application.ScreenUpdating = True
      End If
  End Sub
  </code></pre>