Solved

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

Posted on 2014-09-26
3
239 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 119

Accepted Solution

by:
Rey Obrero 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now