?
Solved

Disable VB Editor in Excel 2003?

Posted on 2012-08-22
13
Medium Priority
?
214 Views
Last Modified: 2012-12-09
Is there a way to disable VB Editor for all users via registry?  We are using a Citrix server and want to disable it on the box.
0
Comment
Question by:mystikal1000
  • 6
  • 5
  • 2
13 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 38323746
No call to do this myself so cannot validate the viability but since a response is proving difficult you might like to check http://support.microsoft.com/kb/281954

Chris
0
 
LVL 46

Expert Comment

by:aikimark
ID: 38324684
How about password protecting the code?
0
 
LVL 1

Author Comment

by:mystikal1000
ID: 38351123
OK if we disable vba, it will not allow macros to run.  Is there a policy or registry setting to figure out only in a certain path, they are allow to run macros, as it would be trusted, otherwise deny running the macros if they running it from a different path location.
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 38351332
Not that I am aware of ... how about signing the approved code ... of course they are at liberty to sign their own code but it would be a bit of a help!

Chris
0
 
LVL 46

Expert Comment

by:aikimark
ID: 38351377
So, you really need the code to only run when the workbook is in a certain location as well as protect the code from being see/modified?
0
 
LVL 1

Author Comment

by:mystikal1000
ID: 38355118
Correct Aikimark
0
 
LVL 46

Expert Comment

by:aikimark
ID: 38355675
what are valid locations and what would be examples of invalid locations?
0
 
LVL 1

Author Comment

by:mystikal1000
ID: 38355865
c:\macros  = valid
all other locations invalid :)
0
 
LVL 46

Accepted Solution

by:
aikimark earned 2000 total points
ID: 38355988
Add a function that returns a boolean value and invoke that function from all your routines.  If you get a false result, then don't execute the code

Public Function IsValidLocation() As Boolean
    IsValidLocation = (ThisWorkbook.path = "c:\macros")
End Function

Open in new window


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If IsValidLocation Then
    Else
        Msgbox "You are the weakest link.  Good bye."
        Exit Sub
    End If

    'Your existing code goes here
End Sub

Open in new window

0
 
LVL 1

Author Comment

by:mystikal1000
ID: 38356243
How can I make it run when excel launches, cause this is for Remote Desktop users.  Any registry locations, or?
0
 
LVL 46

Expert Comment

by:aikimark
ID: 38356264
I don't understand.  It is your code that you are protecting.  If you don't want the code to execute, then it seems like you have what you need.  You just need to implement this check in your routines.  If you have a Workbook_Open() event coded, then you would also add the check there.
0
 
LVL 1

Author Comment

by:mystikal1000
ID: 38364777
Sorry I am just wondering where I can put this code, so it occurs on the server, we have multiple customers logging in and I want to make sure the code is there everytime they load up or create a macro.
0
 
LVL 46

Expert Comment

by:aikimark
ID: 38364923
I would start by packaging your code as an add-in.  That way, the code will be in everyone's Excel environment.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question