+ Reply to Thread
Results 1 to 2 of 2

Worksheet naming has stopped working

  1. #1
    Registered User
    Join Date
    07-30-2017
    Location
    Sandy, Utah, USA
    MS-Off Ver
    2010
    Posts
    2

    Worksheet naming has stopped working

    I have an EXCEL Macro that contains the following code. I have used it for a couple of years, but it recently quit working. I am using Excel 2010.

    Dim WK2 As Worksheet

    Set WK2 = Worksheets(2)

    LastRow = WK2.Cells(Rows.Count, namecol).End(xlUp).Row

    I get an error with this this. If I change it to the following, it works.

    WK2.Activate
    With ActiveSheet
    LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
    End With

    I have other uses of this and it appears they do not work now.

    kadmin1 = WK2.Range(admincol & CurrentRow1)


    Any help on this would be much appreciated.
    Last edited by kcjaffa; 07-30-2017 at 05:52 PM. Reason: typo

  2. #2
    Registered User
    Join Date
    07-30-2017
    Location
    Sandy, Utah, USA
    MS-Off Ver
    2010
    Posts
    2

    Re: Worksheet naming has stopped working

    Please ignore this posting. I found the problem. The program is fine. I just entered the wrong data and need to improve the error checking.

+ 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. My worksheet code stopped working
    By SiddiqFarid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2015, 07:23 AM
  2. [SOLVED] excel 'has stopped working' after Worksheet Change VBA
    By milo1984 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-08-2014, 05:05 AM
  3. Replies: 2
    Last Post: 10-22-2012, 09:55 AM
  4. [SOLVED] Code stopped working, can no longer copy and save a worksheet
    By Oracle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-30-2012, 07:56 PM
  5. ocde working in one windows login but stopped working in another.
    By rama1209 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2011, 08:38 AM
  6. VBA stopped working!!
    By maxthebear in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2009, 09:51 PM
  7. Excel cell references to 2nd worksheet stopped working
    By StardustMM in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-11-2005, 01:06 PM

Tags for this Thread

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