?
Solved

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

Posted on 2014-09-26
3
Medium Priority
?
272 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 2000 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

765 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