![install vba in excel 2016 install vba in excel 2016](https://cdn.ablebits.com/_img-blog/excel-visual-basic-for-applications/insert-vba-module.png)
Oh, and for the sake of documenting it, I ran a Repair on the Office installation, which didn't help. NET Framework 3.5 enabled, so I enabled it, rebooted, and the macro still works. Via Control Panel -> Programs and Features -> Turn Windows Features on and off - the VM did NOT have.Via Control Panel -> Programs and Features - again, if it's on the VM, it's on the PC.The features installed for Office 2016 - they are identical.Installed Optional Features - if it's on the VM, its also on the PC.Other than that, nothing is on the VM that Installed apps - the VM has a bunch of bloatware games that the PCĭoes not (thanks MS!).Then I installed Office 2016 and the macro works fine.
INSTALL VBA IN EXCEL 2016 WINDOWS 10
I downloaded the MS Windows 10 version 1809 installation media and installed Win10 Pro on a new virtual machine, then installed all Windows updates to bring it as close as possible to my problem PC.
![install vba in excel 2016 install vba in excel 2016](https://i.ytimg.com/vi/wE-s87ToCP0/maxresdefault.jpg)
Having 2010 previously installed is NOT the solution. Hopefully the responses will not be "uninstall and reinstall." I'm trying to get around involving our Tech department because their solution may not be timely or helpful. Looking at the Installation Options, everything seems to be the same between the two machines. With ActiveWorkbook.Worksheets("RSVP Report").Sort
![install vba in excel 2016 install vba in excel 2016](https://www.techonthenet.com/excel/macros/images/visual_basic_editor2016_001.png)
"B2:B23"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _ "C2:C23"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _ "A2:A23"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _ Sub Macro2()ĪctiveWorkbook.Worksheets("RSVP Report").ĪctiveWorkbook.Worksheets("RSVP Report"). Key:=Range( _
INSTALL VBA IN EXCEL 2016 CODE
See code that works and was recorded on my machine. := xlSortOnValues, Query := xlAscending, := xlSortNormalĪctiveSheet.("RSVP Report").SetFirstPriority.Add := Range("B2:B23"), Value _ := xlSortOnValues, Query := xlDescending, := xlSortNormalĪctiveSheet.("RSVP Report").SetFirstPriority.Add := Range("C2:C23"), Value _ Sub Macro1()ĪctiveSheet.("RSVP Report").SetFirstPriority.ĪctiveSheet.("RSVP Report").SetFirstPriority.Add := Range("A2:A23"), Value _ Note the missing ".Sort" and double period in between ("RSVP Report") and SetFirstPriority. Sort method is missing from that machine. I recorded a Sort macro using the Developer Toolbar. On that machine, I get a Runtime 9 or Runtime 438 error. I have VBA code that sorts a specific sheet. There seems to be something wrong with Excel as installed on one of the computers in our office.