Bank lending is an important source of funding for firms. Most loans are in the form of credit lines. Empirical studies of line demand have been complicated by their use of data on publicly traded firms, which have a wide menu of financing options. We avoid this problem by using a unique proprietary data set from a large financial institution of loan commitments made to 712 privately-held firms. We test Martin and Santomero's (1997) model, in which lines give firms the speed and flexibility to pursue investment opportunities. Our findings are consistent with their predictions. Firms facing higher rates and fees have smaller credit lines. Firms with higher growth commit to larger lines of credit and have a higher rate of line utilization. Firms experiencing more uncertainty in their funding needs commit to smaller credit lines. Almost all firms convert unused credit line portions into spot loans and take out new lines.