S
Shady Brady Hat
Guest
I have a VB.Net program that builds a spread sheet and then inserts a .BAS sort routing into the macro area of the spread sheet. This works great on my machine, the one that I developed the program on but fails with this message, "Programmatic access to Visual Basic Project is not trusted" when run on my wife's machine which is at the same level of Win 10 as mine. The spreadsheet is an interim step of a process and happens several times over so manually building the sort is out of the question. Both machines are running with an administrator ID.
Try
' The Import method lets you add modules to VBA at
' run time. Change the file path to match the location
' of the text file you created in step 3.
MsgBox(MyListviewSortName)
NewError = 1
xlapp.VBE.ActiveVBProject.VBComponents.Import(MyListviewSortName)
Catch
MsgBox("Import Sort " & NewError.ToString & vbCrLf & ErrorToString())
Exit Sub
End Try
Gene
Continue reading...
Try
' The Import method lets you add modules to VBA at
' run time. Change the file path to match the location
' of the text file you created in step 3.
MsgBox(MyListviewSortName)
NewError = 1
xlapp.VBE.ActiveVBProject.VBComponents.Import(MyListviewSortName)
Catch
MsgBox("Import Sort " & NewError.ToString & vbCrLf & ErrorToString())
Exit Sub
End Try
Gene
Continue reading...