Forum Discussion

Faraj_M's avatar
Faraj_M
Copper Contributor
Apr 15, 2020
Solved

Macro on non active sheet

Hello,  I am very new to VBA coding and I am having some problems with a VBA code which I found online:   Sub Create() Dim I As Long Dim xNumber As Integer Dim xName As String Dim xActiveSheet...
  • Riny_van_Eekelen's avatar
    Apr 16, 2020

    Faraj_M 

    Change the line in the middle to this, and it should work.

    Set xActiveSheet = Sheets("Copy")

    To put a button on the INPUT sheet, select it from the "toolbox" on the Developer ribbon and assign the macro to it.

     

Resources