Solved

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

Posted on 2014-09-26
3
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

730 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