+ Reply to Thread
Results 1 to 4 of 4

How can I add "If ActiveSheet.Name = "Sheet2" Then" to the following code in a module ?

  1. #1
    Forum Contributor
    Join Date
    12-11-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    308

    How can I add "If ActiveSheet.Name = "Sheet2" Then" to the following code in a module ?

    How can I add "If ActiveSheet.Name = "Sheet2" Then" to the following code in a module ?
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How can I add "If ActiveSheet.Name = "Sheet2" Then" to the following code in a module

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-11-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    308

    Re: How can I add "If ActiveSheet.Name = "Sheet2" Then" to the following code in a module

    Thanx for the great help. It has a small flaw..... there should be one end if before the first End If and there should be another "If ActiveSheet.Name = "Sheet2" Then" after the last Sub REMAVRET().

  4. #4
    Forum Contributor
    Join Date
    12-11-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    308

    Re: How can I add "If ActiveSheet.Name = "Sheet2" Then" to the following code in a module

    CORRECTION:- Thanx for the great help. It has a small flaw..... there should be one "End if" before the first "End Sub" and there should be another "If ActiveSheet.Name = "Sheet2" Then" after the last Sub REMAVRET().

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] If Not ActiveSheet.Range("A1").Value Like "apple" Then MsgBox "Error"
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-18-2014, 02:16 PM
  2. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  3. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  4. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  5. [SOLVED] Sheets("Sheet2").Range("AA1") = "Note"
    By dcburkejr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-03-2012, 04:10 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1