+ Reply to Thread
Results 1 to 4 of 4

VBA not working after emailed

  1. #1
    Registered User
    Join Date
    02-18-2010
    Location
    Bangkok Thailand
    MS-Off Ver
    Excel 2007
    Posts
    9

    VBA not working after emailed

    I am totally new at this and downloaded some simple code. It is working great on my spreadsheet but when I emailed it the code does not work on the other end. Macros has been enabled I I have had them check the code and it is all the same. Any help would be appreciated.

    Thanks

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA not working after emailed

    It would help to see the code and to know exactly what you mean by "doesn't work". Does it not do anything, do the wrong thing, error out or something else?
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    02-18-2010
    Location
    Bangkok Thailand
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: VBA not working after emailed

    Thanks for your response. When we tried to enter a new amount to be added to the target nothing happened in the tgarget cell at all.I have pasted in the code below.
    Regards,

    Private Sub Worksheet_Change(ByVal Target As Range)
    Select Case Target.Address
    Case "$C$9"
    If Target.Address <> "$C$9" Then Exit Sub
    Range("c6") = Range("c6") + Target
    Case "$C$16"
    If Target.Address <> "$C$16" Then Exit Sub
    Range("c13") = Range("c13") + Target
    Case "$D$9"
    If Target.Address <> "$D$9" Then Exit Sub
    Range("d6") = Range("d6") + Target
    Case "$D$16"
    If Target.Address <> "$D$16" Then Exit Sub
    Range("d13") = Range("d13") + Target
    Case "$A$9"
    If Target.Address <> "$A$9" Then Exit Sub
    Range("a6") = Range("a6") + Target
    Case "$A$16"
    If Target.Address <> "$A$16" Then Exit Sub
    Range("a13") = Range("a13") + Target
    Case Else
    Exit Sub
    End Select

    End Sub

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA not working after emailed

    Could you enclose that in code tags please, or I'll get told off for answering you!

    PS To do that, you put :
    [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]
    Last edited by romperstomper; 02-19-2010 at 08:39 AM.

+ 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