Results 1 to 2 of 2

2013 excel to 2016 excel now creating a bug

Threaded View

  1. #1
    Registered User
    Join Date
    12-07-2012
    Location
    london england
    MS-Off Ver
    Excel 2010
    Posts
    21

    2013 excel to 2016 excel now creating a bug

    Hi Everyone,

    I'm after a little help if possible.

    I have a programme that basically controls the issuing of documentation on a site, because there can be anything from 1 to 70 tabs visible depending on their selections of requirements as they work their way through it.
    Due to the large no of tabs, I had a hyperlinked index sheet which you could select the name of the sheet in column K and it would hyperlink you to cell A1 on that particular tab.

    This has always worked up until the latest updates released from Microsoft.

    When I use the programme in 2013 excel it works fine, so at present we have had to revert our machines back to 2013 excel to get us by.

    However I do like some of the things available in 2016 excel, it also made some of our other programmes run a little quicker, so ideally id like to still use it.

    Below is the code I use, maybe they have changed some of the words used within excel?

    Apologies I'm pretty new to coding and I took bits of the code from something I found on the web.


    Any help really appreciated!


    Private Sub Worksheet_Activate()
    
    Application.EnableCancelKey = xlDisabled
    
    Dim wSheet As Worksheet
    Dim n As Integer
    Dim calcState As Long, scrUpdateState As Long
    
    On Error GoTo Woops
    
    calcState = Application.Calculation
    Application.Calculation = xlCalculationManual
    scrUpdateState = Application.ScreenUpdating
    Application.ScreenUpdating = False
    
    
    Columns("k:k").ClearContents
    
    n = 1
    
        With Me
            .Columns(5).ClearContents
            .Cells(1, 5) = "Hyperlinked Index"
            .Cells(1, 5).Name = "Index"
        End With
        
        For Each wSheet In Worksheets
            If wSheet.Name <> Me.Name And wSheet.Visible = xlSheetVisible Then
                n = n + 1
                    With wSheet
                        .Range("A1").Name = "Start_" & wSheet.Index
                         .Hyperlinks.Add anchor:=.Range("A1"), Address:="", _
                        SubAddress:="Index", TextToDisplay:="Back to Index"
                    End With
                    
                    Me.Hyperlinks.Add anchor:=Me.Cells(n, 5), Address:="", _
                    SubAddress:="Start_" & wSheet.Index, TextToDisplay:=wSheet.Name
            End If
        Next wSheet
        
    Application.Calculation = calcState
    Application.ScreenUpdating = scrUpdateState
    
    ActiveSheet.Unprotect Password:="changed"
    Columns("E:E").Select
        Selection.Copy
        ActiveSheet.Unprotect Password:="changed"
        Columns("K:K").Select
        ActiveSheet.Paste
        Application.CutCopyMode = False
        ActiveSheet.Unprotect Password:="changed"
         Columns("K:K").Select
        Selection.ColumnWidth = 45
        Columns("E:E").Select
    ActiveSheet.Protect Password:="changed"
    
    woops:
    Resume Next
    
    End Sub
    Last edited by Leith Ross; 11-25-2016 at 08:17 PM. Reason: Fixed Code Tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Creating new folders and file names using data from sheets in Excel 2016 Mac
    By DylanM in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-11-2016, 09:05 AM
  2. Replies: 4
    Last Post: 09-07-2016, 04:52 AM
  3. Problem running Auto_Open from add-ins in Excel 2013 and 2016
    By Cashgenerator in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-24-2016, 08:53 AM
  4. Excel 2013 Macros with Win 10 + Excel 2016
    By sunilvs24 in forum Office 365
    Replies: 2
    Last Post: 07-19-2016, 05:45 AM
  5. Replies: 2
    Last Post: 05-13-2016, 01:01 PM
  6. Macro From Excel 2013 Not Working in 2016
    By tm1238 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-08-2016, 04:39 PM
  7. Replies: 0
    Last Post: 01-09-2016, 02:02 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