+ Reply to Thread
Results 1 to 8 of 8

Auto Record Transfer (2)

  1. #1
    Freshman
    Guest

    Auto Record Transfer (2)

    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



  2. #2
    Anne Troy
    Guest

    Re: Auto Record Transfer (2)

    Where did you store the code, Freshman? And/or what happens when you run the
    code on other PCs? Do the other PCs have macros enabled?
    ************
    Anne Troy
    www.OfficeArticles.com

    "Freshman" <[email protected]> wrote in message
    news:[email protected]...
    > 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
    >
    >




  3. #3
    Freshman
    Guest

    Re: Auto Record Transfer (2)

    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.
    "Anne Troy" wrote:

    > Where did you store the code, Freshman? And/or what happens when you run the
    > code on other PCs? Do the other PCs have macros enabled?
    > ************
    > Anne Troy
    > www.OfficeArticles.com
    >
    > "Freshman" <[email protected]> wrote in message
    > news:[email protected]...
    > > 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
    > >
    > >

    >
    >
    >


  4. #4
    Anne Troy
    Guest

    Re: Auto Record Transfer (2)

    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

    "Freshman" <[email protected]> wrote in message
    news:[email protected]...
    > 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.
    > "Anne Troy" wrote:
    >
    >> Where did you store the code, Freshman? And/or what happens when you run
    >> the
    >> code on other PCs? Do the other PCs have macros enabled?
    >> ************
    >> Anne Troy
    >> www.OfficeArticles.com
    >>
    >> "Freshman" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > 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
    >> >
    >> >

    >>
    >>
    >>




  5. #5
    Freshman
    Guest

    Re: Auto Record Transfer (2)

    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.

    "Anne Troy" wrote:

    > 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
    >
    > "Freshman" <[email protected]> wrote in message
    > news:[email protected]...
    > > 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.
    > > "Anne Troy" wrote:
    > >
    > >> Where did you store the code, Freshman? And/or what happens when you run
    > >> the
    > >> code on other PCs? Do the other PCs have macros enabled?
    > >> ************
    > >> Anne Troy
    > >> www.OfficeArticles.com
    > >>
    > >> "Freshman" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >> > 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
    > >> >
    > >> >
    > >>
    > >>
    > >>

    >
    >
    >


  6. #6
    Anne Troy
    Guest

    Re: Auto Record Transfer (2)

    This just gets weirder, guy. I don't know what to tell you. Any way I can
    see the workbook to test here?
    ************
    Anne Troy
    www.OfficeArticles.com

    "Freshman" <[email protected]> wrote in message
    news:[email protected]...
    > 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.
    >
    > "Anne Troy" wrote:
    >
    >> 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
    >>
    >> "Freshman" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > 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.
    >> > "Anne Troy" wrote:
    >> >
    >> >> Where did you store the code, Freshman? And/or what happens when you
    >> >> run
    >> >> the
    >> >> code on other PCs? Do the other PCs have macros enabled?
    >> >> ************
    >> >> Anne Troy
    >> >> www.OfficeArticles.com
    >> >>
    >> >> "Freshman" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> > 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
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  7. #7
    Freshman
    Guest

    Re: Auto Record Transfer (2)

    Hi Anne,

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

    Best regards.

    "Anne Troy" wrote:

    > This just gets weirder, guy. I don't know what to tell you. Any way I can
    > see the workbook to test here?
    > ************
    > Anne Troy
    > www.OfficeArticles.com
    >
    > "Freshman" <[email protected]> wrote in message
    > news:[email protected]...
    > > 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.
    > >
    > > "Anne Troy" wrote:
    > >
    > >> 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
    > >>
    > >> "Freshman" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >> > 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.
    > >> > "Anne Troy" wrote:
    > >> >
    > >> >> Where did you store the code, Freshman? And/or what happens when you
    > >> >> run
    > >> >> the
    > >> >> code on other PCs? Do the other PCs have macros enabled?
    > >> >> ************
    > >> >> Anne Troy
    > >> >> www.OfficeArticles.com
    > >> >>
    > >> >> "Freshman" <[email protected]> wrote in message
    > >> >> news:[email protected]...
    > >> >> > 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
    > >> >> >
    > >> >> >
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >


  8. #8
    Anne Troy
    Guest

    Re: Auto Record Transfer (2)

    Sure... use [email protected]
    I haven't had to change it due to too much spam yet, tho I will soon!
    ************
    Anne Troy
    www.OfficeArticles.com

    "Freshman" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Anne,
    >
    > Can I have your e-mail address so that I can forward the file to you?
    >
    > Best regards.
    >
    > "Anne Troy" wrote:
    >
    >> This just gets weirder, guy. I don't know what to tell you. Any way I can
    >> see the workbook to test here?
    >> ************
    >> Anne Troy
    >> www.OfficeArticles.com
    >>
    >> "Freshman" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > 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.
    >> >
    >> > "Anne Troy" wrote:
    >> >
    >> >> 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
    >> >>
    >> >> "Freshman" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> > 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.
    >> >> > "Anne Troy" wrote:
    >> >> >
    >> >> >> Where did you store the code, Freshman? And/or what happens when
    >> >> >> you
    >> >> >> run
    >> >> >> the
    >> >> >> code on other PCs? Do the other PCs have macros enabled?
    >> >> >> ************
    >> >> >> Anne Troy
    >> >> >> www.OfficeArticles.com
    >> >> >>
    >> >> >> "Freshman" <[email protected]> wrote in message
    >> >> >> news:[email protected]...
    >> >> >> > 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
    >> >> >> >
    >> >> >> >
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1