ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Set the Column/Length format on an Excell sheet (https://www.excelbanter.com/excel-discussion-misc-queries/232462-set-column-length-format-excell-sheet.html)

Jeffery B Paarsa

Set the Column/Length format on an Excell sheet
 
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


joel

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



All times are GMT +1. The time now is 12:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com