Results 1 to 7 of 7

Excel Macro Acts Differently on Different Computers, even with same version

Threaded View

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Excel Macro Acts Differently on Different Computers, even with same version

    Hi all.

    I have developed this macro that is supposed to create a new worksheet titled "Histogram". First, it will delete any worksheet already named histogram, and then go on to build the new histogram/worksheet. Unfortunately, on some computers, it will get as far as deleting the histogram, and then just stop, while it works flawlessly on other computers. Any help or ideas to resolve would be greatly appreciated!

    Here's a snippet of the code through the error:

    If Range("C3") = "" Then
            MsgBox "You do not have enough data to perform this function."
            Exit Sub
            End If
        Dim Response As VbMsgBoxResult
        Response = MsgBox("Warning: If you have a worksheet titled 'Histogram' it will be deleted. Are you sure you want to continue?", vbExclamation + vbYesNo, "Histogram Sheet Deletion")
        If Response = vbNo Then Exit Sub
        Application.DisplayAlerts = False
        On Error Resume Next
        Sheets("Histogram").Delete
        Application.DisplayAlerts = True
        Application.Run "ATPVBAEN.XLAM!Histogram", ActiveSheet.Range("DynamicHistogramData") _
            , "Histogram", , False, False, True, False
        Range("E15").Select
        ActiveSheet.ChartObjects("Chart 1").Activate
        ActiveChart.PlotArea.Select
        ActiveSheet.ChartObjects("Chart 1").Activate
        ActiveChart.ChartArea.Select
        ActiveChart.PlotVisibleOnly = False
    Last edited by dbaft; 01-24-2011 at 08:06 AM.

Thread Information

Users Browsing this Thread

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

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