View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Set the Column/Length format on an Excell sheet

Try recording a macro when you have a problem like this

Columns("").NumberFormat = "@"
Columns("B").NumberFormat = "[<=9999999]###-####;(###) ###-####"

"Jeffery B Paarsa" wrote:

Hello,

When I import an Excel spread sheet to my Access DB table, each Column on my
Access Table gets the default Field Size of 255 with the format of @... How
can I set the lengths of a column to an specific size and format, i.e. 40
char. or Telephone number, or ?

I tried difrent combination of the following with no success:

Sub FmtCell()
Range("A1").EntireColumn.Format.Text = ("Text")
Range("B1").EntireColumn.Format.Special ("Phone")
End Sub
--
Jeff B Paarsa