Solved

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

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

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…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

896 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

15 Experts available now in Live!

Get 1:1 Help Now