Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running VBA Code

Status
Not open for further replies.

ChewDoggie

Programmer
Mar 14, 2005
604
US
Hello all,

I've written some VBA code in a 'Worksheet_Change' Event. But the code doesn't execute on the Employee's PC.

Does anything need to be installed on the PC to make the code run ?

FYI...the Macros are enabled and the Employee has proper permissions on the file.

Thanks !

Chew


10% of your life is what happens to you. 90% of your life is how you deal with it.
 
Yes to all points.

Also, I have admin privledges on the system but Skip (my historical Excel Savior) has told me that file permissions would not be an issue.

This one has me baffled.

C.


10% of your life is what happens to you. 90% of your life is how you deal with it.
 
Sorry, also dealing with software issues on the plant floor this morning.

In response to Skip:

I don't know if this answers your question. The VBA Object is "Sheet8 (Attendance)", according to the project explorer window.

The parent object in the Project Explorer is "VBA Project (Erika's Attendance Report)". Then a child node below that is "Microsoft Excel Objects". Then a list of nodes below that are the Sheets, listed 1-12 with the name of each sheet appearing in parens).



10% of your life is what happens to you. 90% of your life is how you deal with it.
 
...and the highlighted sheet is "Sheet8 (Attendance)".

HTH

Chew

10% of your life is what happens to you. 90% of your life is how you deal with it.
 
just thinking aloud....

does anything like a VB6 runtime have to be installed on the PC ?
does anything relating to the .NET Framework class library have to be installed on the PC ?

C.


10% of your life is what happens to you. 90% of your life is how you deal with it.
 



"does anything like a VB6 runtime have to be installed on the PC ?"
No
"does anything relating to the .NET Framework class library have to be installed on the PC ?"
No

Its all packaged in Excel.

I could not determine if you answered, "can you run ANY procedure in this workbook?"

Does the Worksheet_Change event fire on any other sheet? Please test and report.

In the ThisWorkbook pbject, paste, for testing purposes...
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    MsgBox Sh.Name & "!" & Target.Address
End Sub

Then, what happens when you change a cell on sheet Attendance?




Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I will check on this hsortly and report back.

C.


10% of your life is what happens to you. 90% of your life is how you deal with it.
 
OK, I've figured this out.

This issue all along was whether the Excel File was located in a "Trusted Location". I clicked on the office button, then Excel Options, then clicked on Trust Center and then the Trust Center Settings button. In there, there's a list of "Trusted Locations". I copied the file to one of those locations and then she opened the file from in there and changed a cell value in column "M" and, presto, the break point was hit.

Thanks to Skip and strongm for their persistence and help !

C.


10% of your life is what happens to you. 90% of your life is how you deal with it.
 
LOL !!!

Thank you, Merry Chris Moose to you too.

C.

10% of your life is what happens to you. 90% of your life is how you deal with it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top