Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 49946

Format Number with Macro

$
0
0
I have an Access database where the number format of several columns is field size=double decimal places=auto

My Excel Macro where I format the cells is:

Code:

  Columns("A:B").Select
    Selection.NumberFormat = "0"

When I import the Excel sheet, it changes the 2 columns to field size=double format=0 decimal places=auto.

Because of this, the DBA cannot simply append my data on the import because she gets a key violation. How do I alter my macro so it will just mirror Access?

Viewing all articles
Browse latest Browse all 49946

Trending Articles