<PAGE>   1
                                                                   EXHIBIT 10.24


                      FOURTH AMENDMENT TO CREDIT AGREEMENT

     THIS FOURTH AMENDMENT TO CREDIT AGREEMENT (this "Amendment") is made and
entered into as of this 24th day of August, 1999 by and among MARSHALL
INDUSTRIES, a corporation organized under the laws of California ("Marshall"),
STERLING ELECTRONICS CORPORATION, a corporation organized under the laws of
Nevada ("Sterling," and together with Marshall, the "Borrower"), the Lenders
who are or may become a party to the Credit Agreement referred to below, and
FIRST UNION NATIONAL BANK, as Administrative Agent for the Lenders.

                              Statement of Purpose

     The Lenders agreed to make certain Extensions of Credit to the Borrower
pursuant to the Credit Agreement dated as of January 16, 1998 by and among the
Borrower, the Lenders and the Administrative Agent, as amended by the First
Amendment to Credit Agreement dated February 26, 1998, the Amendment and Waiver
to Credit Agreement dated as of June 29, 1998 and the Third Amendment to Credit
Agreement dated as of June 23, 1999 (as so amended and as further amended or
supplemented from time to time, the "Credit Agreement").

     The parties now desire to amend the Credit Agreement in certain respects
on the terms and conditions set forth below.

     NOW THEREFORE, for good and valuable consideration, the receipt and
adequacy of which are hereby acknowledged, the parties hereto agree as follows:

     1.   Effect of Amendment. Except as expressly amended hereby, the Credit
Agreement and Loan Documents shall be and remain in full force and effect. This
Amendment shall not be deemed (i) to be a waiver of, or consent to, a
modification or amendment of, any other term or condition of the Credit
Agreement or (ii) to prejudice any other right or rights which the
Administrative Agent or the Lenders may now have or may have in the future
under or in connection with the Credit Agreement or the Loan Documents or any
of the instruments or agreements referred to therein, as the same may be
amended and modified from time to time.

     2.   Capitalized Terms. All capitalized undefined terms used in this
Amendment shall have the meanings assigned thereto in the Credit Agreement.

     3.   Modification of Credit Agreement.

          (a)  Section 1.1 of the Credit Agreement is hereby amended by
deleting the definitions of "EBIT", "Operating Cash Flow" and "Tangible Net
Worth" in their entirety and inserting the following definitions in lieu
thereof:

          "EBIT" means, with respect to the Borrower and its Subsidiaries for
     any period, the following calculated without duplication for such period on
     a Consolidated basis in accordance with GAAP: (a) Net Income less (i) to
     the extent included in calculating Net Income, any after-tax




<PAGE>   2
extraordinary gains, plus (ii) to the extent included in calculating Net Income,
any after-tax extraordinary losses (but excluding (A) all such losses relating
to the Acquisition as set forth in clause (iii) below and (B) any non-cash loss
to the extent it represents an accrual of or reserve for cash losses in any
future period plus (iii) any extraordinary losses, whether cash or non-cash,
relating to the Acquisition in an aggregate amount not to exceed $15,000,000
(provided that all such excluded extraordinary losses relating to the
Acquisition must be taken no later than August 31, 1998) plus (b) to the extent
deducted in calculating Net Income, (i) income and franchise taxes, (ii)
Interest Expense and (iii) a one-time non-cash charge in an amount not to exceed
$22,000,000 relating to the write down of Marshall's sixteen percent (16%)
equity ownership interest in Eurotronics B.V., which is the holding company of
the electronics distribution companies of Sonepar Electronique International).
For purposes of calculating compliance with Article X, EBIT shall be adjusted in
a manner reasonably satisfactory to the Administrative Agent to include on a pro
forma basis as of the first day of any calculation period any acquisition
(including the Acquisition) permitted by Section 11.4 consummated during such
period in accordance with this Agreement and exclude on a pro forma basis as of
the first day of any calculation period any Subsidiary or assets (other than
assets sold in the ordinary course of business) sold during such period in
accordance with this Agreement.

     "Operating Cash Flow" means, with respect to the Borrower and its
Subsidiaries for any period, the following, calculated without duplication for
such period on a Consolidated basis in accordance with GAAP: (a) Net Income,
plus (b) to the extent deducted in determining Net Income, (i) income and
franchise taxes, (ii) Interest Expense and (iii) depreciation and amortization
(including amortization of goodwill, software development costs and other
intangibles); provided, that there shall be excluded from Net Income a one-time
non-cash charge in an amount not to exceed $22,000,000 relating to the write
down of Marshall's sixteen percent (16%) equity ownership interest in
Eurotronics B.V., which is the holding company of the electronics distribution
companies of Sonepar Electronique International). For purposes of calculating
compliance with Article X, Operating Cash Flow shall be adjusted in a manner
reasonably satisfactory to the Administrative Agent to include on a pro forma
basis as of the first day of any calculation period any acquisition (including
the Acquisition) permitted by Section 11.4 consummated during such period in
accordance with this Agreement and exclude on a pro forma basis as of the first
day of any calculation period any Subsidiary or assets (other than assets sold
in the ordinary course of business) sold during such period in accordance with
this Agreement.

     "Tangible Net Worth" means, with respect to the Borrower and its
Subsidiaries as of any date of determination, Consolidated stockholders'
equity, less Consolidated intangible assets, including without limitation,
goodwill and unamortized software development costs and discounts, all
calculated in accordance with GAAP; provided, that there shall be excluded from
Consolidated stockholders' equity, a one-time non-cash charge in an amount not
to exceed $22,000,000 relating to the write down of Marshall's sixteen percent
(16%) equity ownership interest in Eurotronics B.V., which is the holding
company of the electronics distribution companies of Sonepar Electronique
International).


                                       2


<PAGE>   3
     (b)  Section 11.4 of the Credit Agreement is hereby amended by deleting the
word "and" at the end of Section 11.4(h), deleting "." at the end of Section
11.4(i) and inserting ";and" in lieu thereof and adding the following Section
11.4(j):

          "(j) investments by the Borrower in the capital stock of Agile
     Software Corporation in an aggregate amount not to exceed $3,000,000."

     4.   Representations and Warranties/No Default. By their execution hereof,
the Borrower hereby certifies that (giving effect to this Amendment) each of
the representations and warranties set forth in the Credit Agreement and the
other Loan Documents is true and correct in all material respects as of the
date hereof as if fully set forth herein, except to the extent that such
representations and warranties expressly relate to an earlier date (in which
case such representations and warranties shall have been true and correct in
all material respects on and as of such earlier date), and that as of the date
hereof no Default or Event of Default has occurred and is continuing.

     5.   Expenses. The Borrowers shall pay all reasonable out-of-pocket
expenses of the Administrative Agent in connection with the preparation,
execution and delivery of this Amendment, including without limitation, the
reasonable fees and disbursements of counsel for the Administrative Agent.

     6.   Governing Law. This Amendment shall be governed by and construed in
accordance with the laws of the State of North Carolina.

     7.   Counterparts. This Amendment may be executed in separate
counterparts, each of which when executed and delivered is an original but all
of which taken together constitute one and the same instrument.

     8.   Effectiveness. This Amendment will become effective when it has been
executed by the Borrowers and Required Lenders and copies of such executed
counterparts have been delivered to the Administrative Agent.


                                       3



<PAGE>   4
     IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
duly executed as of the date and year first above written.


[CORPORATE SEAL]                        MARSHALL INDUSTRIES

                                        By: /s/ HENRY W. CHIN
                                            ----------------------------------
                                        Name:  Henry W. Chin
                                               -------------------------------
                                        Title: Vice President, Finance and CFO
                                               -------------------------------


[CORPORATE SEAL]                        STERLING ELECTRONICS CORPORATION

                                        By: /s/ HENRY W. CHIN
                                            ----------------------------------
                                        Name:  Henry W. Chin
                                               -------------------------------
                                        Title: Vice President, Treasurer
                                               -------------------------------


                    [SIGNATURES CONTINUE ON FOLLOWING PAGE]






[Fourth Amendment]
<PAGE>   5
                                        FIRST UNION NATIONAL BANK,
                                        as Administrative Agent and Lender



                                        By: /s/ GEORGE L. WOOLSEY
                                           ------------------------------------

                                               GEORGE L. WOOLSEY
                                        Name: ---------------------------------

                                                Vice President
                                        Title: --------------------------------



[Fourth Amendment]
<PAGE>   6
                                        COMERICA BANK



                                        By: /s/ EMMANUEL M. SKEVOFILAX
                                           ------------------------------------

                                               EMMANUEL M. SKEVOFILAX
                                        Name: ---------------------------------

                                                Vice President
                                        Title: --------------------------------
<PAGE>   7


                                       THE FIRST NATIONAL BANK OF CHICAGO


                                       By:  /s/ KANDIS A. JAFFREY
                                          --------------------------------
                                       Name:   Kandis A. Jaffrey
                                            ------------------------------
                                       Title:  Vice President
                                             -----------------------------




[Fourth Amendment]

<PAGE>   8

                                       BANK OF AMERICA, N.A.


                                       By:  /s/ DOUGLAS T. MECKELNBURG
                                          --------------------------------
                                       Name:   DOUGLAS T. MECKELNBURG
                                            ------------------------------
                                       Title:  Vice President
                                             -----------------------------




[Fourth Amendment]

<PAGE>   9

                                       UNION BANK OF CALIFORNIA, N.A.


                                       By:  /s/ RONALD L. WATTERWORTH
                                          --------------------------------
                                       Name:   Ronald L. Watterworth
                                            ------------------------------
                                       Title:  Vice President
                                             -----------------------------




[Fourth Amendment]

<PAGE>   10
                                          WELLS FARGO BANK, NATIONAL
                                          ASSOCIATION


                                          By:   /s/ NANCY S. MARTORANO
                                             -----------------------------------

                                          Name:   Nancy S. Martorano
                                               ---------------------------------

                                          Title:  Vice President
                                                --------------------------------


[Fourth Amendment]
<PAGE>   11
                                          BANQUE NATIONAL DE PARIS


                                          By:   /s/ FREDERIQUE MERHAUT
                                             -----------------------------------

                                          Name:  Frederique Merhaut
                                               ---------------------------------

                                          Title: Vice President & Credit Manager
                                                --------------------------------



                                          By:   /s/ JEFFREY KING
                                             -----------------------------------

                                          Name:  Jeffrey King
                                               ---------------------------------

                                          Title: Assistant Vice President

                                                --------------------------------

[Fourth Amendment]