Solved

From MS Access 2007 use VBA to change column A to general formating in Excel worksheet

Posted on 2014-09-26
3
251 Views
Last Modified: 2014-09-26
From MS Access 2007 open a Excel workbook.  Then change column A formating to general.
Column A  currently has  [=1]"ONE";[=0]"////";General

I'm going to do a filecopy of the Excel workbook, then change the copied workbook column A formating to general

The reason for changing the formating , when importing only th  "ONE" is imported even if there is another value entered.
0
Comment
Question by:newholyman
  • 2
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 40346788
dim xlObj as object
set xlObj=createobject("excel.application")

xlobj.workbooks.open <path and excel file name>

with xlObj
     .worksheets("nameOfsheet").select
     .columns("A:A").select
     .selection.numberformat="General"
end with

xlobj.quit

end with
0
 

Author Comment

by:newholyman
ID: 40346795
Thank you sir.

Will need to save work book for the change to be effective?

Again, Thank you.
0
 

Author Comment

by:newholyman
ID: 40346815
I've requested that this question be closed as follows:

Accepted answer: 0 points for newholyman's comment #a40346795

for the following reason:

This resolved my question.  Thank you1
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question