Auto Record Transfer (2)

F

Freshman

Dear experts/Bernie Deitrick

Bernie wrote me the code below for transferring records from one sheet to
another and it works perfectly well in my PC. However, when I put the file
into a common network drive and share with other users inside my Company, the
code only work in my PC and not in other users' PCs. Is the code below has
some restriction to my PC only? If yes, how to modify the code so that the
file can be used by other users.

Please advise and thanks in advance.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myCell As Range
On Error GoTo ErrorHandler
Application.EnableEvents = False
If Target.Column = 4 And Target(1).Value = "Y" Then
Dim eRow As Long
eRow = Sheets("Completed").Cells(Rows.Count, 1).End(xlUp).Row + 1
For Each myCell In Target
myCell.Offset(0, -3).Resize(, 4).Copy _
Sheets("Completed").Cells(eRow, 1)
eRow = eRow + 1
Next myCell
Target.EntireRow.Delete
End If
ErrorHandler:
Application.EnableEvents = True
End Sub
 
F

Freshman

Hi Anne,

I store the code in the worksheet of VBE(right click the sheet tab and
choose "view code").
When other users typed "Y" on the same worksheet, nothing happened and the
code seems not running.
Please kindly advise your meaning of enabling the macros. How? Is it press
F5 to run the code. However, I cannot see the macro name in the "Marco"
dialogue box. Please kindly advise what's wrong.

Sorry for my limited knowledge to VBA (though I'm try my best to learn right
now).

Thanks.
 
A

Anne Troy

Sorry. Dumb question, Freshman. Which workbook did you store it in? If it's
in your personal.xls file, then you're not really sending your code to the
others.
If macro security is set to medium (Tools-->Macro-->Security) and you open a
workbook that contains macros, you are asked if you want to enable macros.
But if security is set higher than medium, you are not asked at all--and
macros aren't enabled. Check the settings of the other users.
************
Anne Troy
www.OfficeArticles.com
 
F

Freshman

Hi Anne,

The code is stored in a workbook other than personal.xls file.
I've checked other users' setting and the marco security is medium only.

Thanks.
 
F

Freshman

Hi Anne,

Can I have your e-mail address so that I can forward the file to you?

Best regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top