Formatting cells in excel

Hi,

I have a button that creates an Excel file and populates the data into the worksheet from the Form. I want to format the selected rows and assign the data type to the cells as TEXT.

I have done the following:

Set xlApp = CreateObject(“Excel.application”)

xlApp.Rows(“1:1”).Select

xlApp.Selection.Font.Bold = True

How should I assign the value Text to the cell. I tried doing:

xlApp.Rows(“1:1”).NumberFormat=“Text”

But this did not worked out.

Please can anyone help me for this

Thanks in advance

Subject: Formatting cells in excel

Try recording a macro and set the row to the text format. When you look at the macro, you’ll see how Excel tells a row/column/cell to be text.

HTH

Doug