The user will need to establish that trusted access setting maually. That is the reason why this security feature was instituted in 2002, to give the user some control over their local system when other code attempts to write to their VBE, as Tushar said.
I wrote the following code for apps I design for some of my clients, which checks the local system (user's) trusted access status. If access has been set already, I don't bother them with any warnings. If access has not been granted, the macro will terminate, and the user will be told why (no VBE access) and how they can grant access to make the macro work for them after that. Go ahead and modify the code as you need to for your situation from this hypothetical macro that gives an example of how to check for trusted source status:
Sub CheckStatus()
MsgBox "This represents the start of your macro.", 64, "Beginning of hypothetical larger macro."
Dim MyVBE As Object
If Val(Application.Version) >= 10 Then
On Error Resume Next
Set MyVBE = ActiveWorkbook.VBProject
If Err.Number <> 0 Then
MsgBox _
"The security settings for Excel on your computer are not set" & vbCrLf & _
"to allow this code to execute. This security measure deals" & vbCrLf & _
"with permissible access to the Visual Basic Editor, and was" & vbCrLf & _
"added to versions beginning with Excel2002, which is also" & vbCrLf & _
"known as version 10, and your version is " & Val(Application.Version) & "." & vbCrLf & vbCrLf & _
"To enable your computer to accept this code, please follow" & vbCrLf & _
"these steps:" & vbCrLf & vbCrLf & _
"(1) Click the OK button at the bottom of this message." & vbCrLf & _
"(2) From the worksheet menu, click Tools > Macro > Security." & vbCrLf & _
"(3) Select the tab named ''Trusted Publishers''." & vbCrLf & _
"(4) Select by putting a checkmark in the box next to" & vbCrLf & _
" ''Trust access to Visual Basic Project''." & vbCrLf & _
"(5) Click the OK button to exit the Security dialog." & vbCrLf & vbCrLf & _
"After that, come back here and try running the macro again.", _
16, "Cannot continue due to security settings - - see explanation below:"
Exit Sub
End If
End If
MsgBox _
"If you see this, then VBE access" & vbCrLf & _
"has been granted by the user.", , "The rest of your code goes here !"
End Sub