marcusblackcat
New Member
- Joined
- Mar 11, 2015
- Messages
- 18
Right - here's the strangest thing I have ever seen in Excel (despite using it since it was invented!)
I have Excel 2016 64bit and have created a file which copies and pastes data when prompted to refresh reports.
I have created reports running from this data which, on my office 2016 64bit machine work absolutely superbly.
However, I have sent this file to 2 people who are using 32 bit version of excel 2010 and it appears to have corrupted their vba.
Both users now get a blank grey screen without as much as a project explorer (or menus) when trying to access the VBA editor. This happens on all workbooks (including a brand new blank one) and, due to this, they can;t access and code to create new or update existing.
The strange thing is - this happened on a single macro. The macro works fine on my computer but seems to have corrupted something on theirs. I have tried repairing the personal.xlsb but I can't find it on their machines (or mine for that matter) (Windows 10). I have been coding for a while but I am still using the "way I know" method which is potentially not the best. I don't really want to attach the workbook as I don't want anyone on here downloading it and breaking their Excel - this is more in hope that someone has seen this before and knows how/why it happened and how to repair it.
There are 3 buttons on the main page - one which imports the data, builds the columns required for the reporting and refreshes the reports (this works fine even without access to the vba editor), one which is a simple navigate to the dashboard which works. The third one rebuilds reports on 5 pages depending upon selections in dropdowns on the control panel. It's the third one which crashed their vba.
Let me know if you want the called macros adding and I'll put them on - just didn't want the post to be massive!!
I have Excel 2016 64bit and have created a file which copies and pastes data when prompted to refresh reports.
I have created reports running from this data which, on my office 2016 64bit machine work absolutely superbly.
However, I have sent this file to 2 people who are using 32 bit version of excel 2010 and it appears to have corrupted their vba.
Both users now get a blank grey screen without as much as a project explorer (or menus) when trying to access the VBA editor. This happens on all workbooks (including a brand new blank one) and, due to this, they can;t access and code to create new or update existing.
The strange thing is - this happened on a single macro. The macro works fine on my computer but seems to have corrupted something on theirs. I have tried repairing the personal.xlsb but I can't find it on their machines (or mine for that matter) (Windows 10). I have been coding for a while but I am still using the "way I know" method which is potentially not the best. I don't really want to attach the workbook as I don't want anyone on here downloading it and breaking their Excel - this is more in hope that someone has seen this before and knows how/why it happened and how to repair it.
There are 3 buttons on the main page - one which imports the data, builds the columns required for the reporting and refreshes the reports (this works fine even without access to the vba editor), one which is a simple navigate to the dashboard which works. The third one rebuilds reports on 5 pages depending upon selections in dropdowns on the control panel. It's the third one which crashed their vba.
VBA Code:
'Macro called on button click
Sub Reporting()
ThisWorkbook.RefreshAll
hidesheetsREPORT
Dim slItem As SlicerItem, wb As Workbook, LocCa(1 To 3) As SlicerCache, _
PCNCa(1 To 3) As SlicerCache, i As Byte, Loc As String, PCN As String, a As Long
Set wb = ThisWorkbook
Loc = Worksheets("Control").Range("WFTLocality")
PCN = Worksheets("Control").Range("WFTPCN")
Highlights1
Highlights3
BuildWFPg1
NewSymptomsReport
DoSReport
Worksheets("Weekly WF Report Pg 1").Activate
For i = 1 To 3
If i = 1 Then
Set LocCa(i) = wb.SlicerCaches("Slicer_Locality")
Set PCNCa(i) = wb.SlicerCaches("Slicer_PCN")
Else
Set LocCa(i) = wb.SlicerCaches("Slicer_Locality" & i - 1)
Set PCNCa(i) = wb.SlicerCaches("Slicer_PCN" & i - 1)
End If
Next i
For i = 1 To 3
a = 0
PCNCa(i).ClearManualFilter
LocCa(i).ClearManualFilter
If Loc <> "All" Then
For Each slItem In LocCa(i).SlicerItems
If slItem.Name <> Loc Then
slItem.Selected = False
Else
slItem.Selected = True
End If
Next slItem
End If
If PCN <> "All" Then
For Each slItem In PCNCa(i).SlicerItems
If slItem.Name <> PCN Then
slItem.Selected = False
Else
slItem.Selected = True
End If
Next slItem
End If
Next i
End Sub