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
Bookmarks