<PAGE>
                                  EXHIBIT 10.W
                                  ------------

                                SECOND AMENDMENT
                               TO CREDIT AGREEMENT

        THIS SECOND AMENDMENT TO CREDIT AGREEMENT (this "Second Amendment")
dated as of March 27, 2002, is made and entered into by and between BELL
INDUSTRIES, INC., a California corporation ("Company"), and UNION BANK OF
CALIFORNIA, N.A., a national banking association ("Bank").

                                    RECITALS:

        A. Company and Bank are parties to that certain Credit Agreement dated
as of April 14, 1999, as amended by that certain First Amendment dated as of
April 26, 2000 (as so amended, the "Agreement"), pursuant to which Bank agreed
to extend credit to Company in the amounts provided for therein.

        B. Company and Bank desire to amend the Agreement, but subject to the
terms and conditions of this Second Amendment.

                                   AGREEMENT:

        In consideration of the above recitals and of the mutual covenants and
conditions contained herein, Company and Bank agree as follows:

1. DEFINED TERMS. Initially capitalized terms used herein which are not
otherwise defined shall have the meanings assigned thereto in the Agreement.

2. AMENDMENTS TO THE AGREEMENT.

        (a) The definition of "REVOLVING LOAN COMMITMENT TERMINATION DATE"
appearing in subsection 1.1 of the Agreement is hereby amended to read in full
as follows:

        "`REVOLVING LOAN COMMITMENT TERMINATION DATE' shall mean May 31, 2004."

        (b) The definition of "CONSOLIDATED NET WORTH" appearing in subsection
1.1 of the Agreement is hereby deleted in its entirety and replaced with the
definition of "CONSOLIDATED TANGIBLE NET WORTH," which shall read in full as
follows:

        "`CONSOLIDATED TANGIBLE NET WORTH' means, as at any date of
determination, the tangible net worth of Company and its Subsidiaries on such
date, determined on a consolidated basis in accordance with GAAP."

        (c) Subsection 2.1A of the Agreement, which sets forth the amount of the
Revolving Loan Commitment, is hereby amended by substituting the amount
"$10,000,000" for the amount "$20,000,000" appearing in the seventh line
thereof.


                                       1
<PAGE>

        (d) Subsection 2.2A(b) of the Agreement, which sets forth the interest
rate payable on a LIBOR Rate Loan, is hereby amended by substituting the
interest rate spread "1.75%" for the interest rate spread "1.375%" appearing in
the second line thereof.

        (e) Subsection 2.3 of the Agreement, which sets forth the amount of the
commitment fee, is hereby amended by substituting the rate "0.500%" for the rate
"0.375%" appearing in the third line thereof.

        (f) Subsection 7.6B of the Agreement is hereby amended to read in full
as follows:

        "B. MINIMUM CONSOLIDATED TANGIBLE NET WORTH. Company shall not permit
the Consolidated Tangible Net Worth of Company and its Subsidiaries to be less
than (i) $24,000,000 as of the last day of each fiscal quarter ending during the
period from December 31, 2001 through and including December 30, 2002, (ii)
$25,000,000 as of the last day of each fiscal quarter ending during the period
from December 31, 2002 through and including March 30, 2003, and (iii) as of
March 31, 2003 and as of the last day of each fiscal quarter thereafter, the sum
of (x) $25,000,000 plus (y) 75% of the positive cumulative Consolidated Net
Income of Company and its Subsidiaries for such fiscal quarter."

        (g) Subsection 7.7(v) of the Agreement is hereby amended to read in full
as follows:

        "(v) Company and its Subsidiaries may acquire the business, property or
fixed assets of, or stock or other evidence of beneficial ownership of, any
Person or any division or line of business of any Person; provided that (a) the
aggregate amount of cash and noncash consideration (including any Indebtedness
assumed by Company or its Subsidiaries but excluding any equity Securities
issued by Company in connection with such transaction) paid by Company and its
Subsidiaries shall not exceed $7,500,000 for any single such acquisition or
related series of acquisitions or $10,000,000 for all such acquisitions in any
Fiscal Year (provided, however, that the aggregate amount of cash consideration
for all such acquisitions in any Fiscal Year shall not exceed $5,000,000), (b)
after giving effect to each such acquisition, Company shall be in compliance
with all provisions of subsection 7.6 on a pro forma basis, (c) Company shall
certify as to its compliance with all provisions of subsection 7.6 on a pro
forma basis in connection with any such acquisition for which the cash and
noncash consideration paid by Company and its Subsidiaries exceeds $2,500,000,
and (d) any business acquired in any such acquisition shall not be materially
different from the lines of business engaged in by Company or its Subsidiaries
as of the Closing Date; and

3. REPLACEMENT REVOLVING NOTE. Exhibit IV to the Agreement, which is the form of
Revolving Note, is hereby replaced with the form of Revolving Note attached to
this Second Amendment as Exhibit IV.

4. REPLACEMENT FINANCIAL STATEMENT AND COMPLIANCE CERTIFICATE. Exhibit V to the
Agreement, which is the form of Financial Statement and Compliance Certificate,
is hereby replaced with the form of Financial Statement and Compliance
Certificate attached to this Second Amendment as Exhibit V.


                                       2
<PAGE>

5. EFFECTIVENESS OF THIS SECOND AMENDMENT. This Second Amendment shall become
effective as of the date hereof when, and only when, Bank shall have received
all of the following, in form and substance satisfactory to Bank:

        (a) A counterpart of this Second Amendment, duly executed by Company;

        (b) A replacement Revolving Note, duly executed by Company;

        (c) A fee in connection with the extension of the Revolving Loan
Commitment Termination Date and the preparation of this Second Amendment in the
sum of Five Thousand Dollars ($5,000); and

        (d) Such other documents, instruments or agreements as Bank may
reasonably deem necessary.

6. RATIFICATION.

        (a) Except as specifically amended hereinabove, the Agreement shall
remain in full force and effect and is hereby ratified and confirmed; and

        (b) Upon the effectiveness of this Second Amendment, each reference in
the Agreement to "this Agreement", "hereunder", "herein", "hereof" or words of
like import referring to the Agreement shall mean and be a reference to the
Agreement as amended by this Second Amendment and each reference in the
Agreement to the "Revolving Note" or words of like import referring to the
Revolving Note shall mean and be a reference to the replacement Revolving Note
issued pursuant to this Second Amendment.

7. REPRESENTATIONS AND WARRANTIES. Company represents and warrants as follows:

        (a) Each of the representations and warranties contained in Section 5 of
the Agreement, as amended hereby, is hereby reaffirmed as of the date hereof,
each as if set forth herein;

        (b) The execution, delivery and performance of this Second Amendment and
the execution and delivery of the replacement Revolving Note are within
Company's corporate powers, have been duly authorized by all necessary corporate
action, have received all necessary approvals, if any, and do not contravene any
law or any contractual restriction binding on Company;

        (c) This Second Amendment is, and the replacement Revolving Note when
delivered for value received will be, the legal, valid and binding obligations
of Company, enforceable against Company in accordance with their respective
terms; and

        (d) No event has occurred and is continuing or would result from this
Second Amendment which constitutes an Event of Default under the Agreement, or
would


                                       3
<PAGE>

constitute an Event of Default but for the requirement that notice be given or
time elapse or both.

8. GOVERNING LAW. This Second Amendment shall be deemed a contract under and
subject to, and shall be construed for all purposes and in accordance with, the
laws of the State of California.

9. COUNTERPARTS. This Second Amendment may be executed in two or more
counterparts, each of which shall be deemed an original and all of which
together shall constitute one and the same instrument.

        WITNESS the due execution hereof as of the date first above written.

"Company"

BELL INDUSTRIES, INC.

By:
    ------------------------------------------
    Russell A. Doll

Title: Senior Vice President -- Chief Financial Officer
       ------------------------------------------------


"Bank"

UNION BANK OF CALIFORNIA, N.A.

By:
    ------------------------------------------
    Robert C. Peterson

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




                                        4