training anthony regarding forma
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Training with Anthony regarding Formating and importing and expo

Training with Anthony regarding Formating and importing and expo

resolvedResolved · Low Priority · Version 2007

replyReply Thu 15 Jul 2010, 14:09Delegate Shamin said...

Shamin has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course

Training with Anthony regarding Formating and importing and expo

Hi Anthony,

You were going to send me the solution for the problem I had with formating during the copying of the date column.

Also your were going to send me the code for importing and exporting CSV file.

Thank you.

Kind regards
Shamin Akhtar

For upcoming training course dates see: Pricing & availability

replyReply Thu 15 Jul 2010, 18:28Trainer Anthony said...

RE: Training with Anthony regarding Formating and importing and

Hi Shamin, thanks for your queries. First of all, this line of code makes the value of h2 the same as a2:

Sheets("mysheet").Range("h2").Value = Sheets("mysheet").Range("a2").Value

...while this line of code makes the number format of h2 the same as a2:

Sheets("mysheet").Range("h2").NumberFormat = Sheets("mysheet").Range("a2").NumberFormat

So you might want to include that in your loops to ensure the integrity of your data.

Secondly, here's the line of code for exporting data as a CSV file:

ActiveWorkbook.SaveAs Filename:="E:\Desktop\SalesReport1.csv", FileFormat:= _
xlCSV, CreateBackup:=False

I hope this proves useful!

Anthony

replyReply Thu 15 Jul 2010, 18:34Delegate Shamin said...

RE: Training with Anthony regarding Formating and importing and

Hi Anthony,

Thank you for the quick response.

I will implement these codes.

Will I do similar step for importing CSV file?

Kind regards
Shamin

replyReply Fri 16 Jul 2010, 07:08Trainer Anthony said...

RE: Training with Anthony regarding Formating and importing and

Hi Shamin, yes the principle is the same for importing a CSV data file but you will have to record a macro yourself to get the specific code. The wizard will ask you for the delimiter and then to format the incoming data which will be a step specific to the data you are working on.

Let me know how you get on,

Anthony

replyReply Fri 16 Jul 2010, 08:03Delegate Shamin said...

RE: Training with Anthony regarding Formating and importing and

Hi,

Thank you.

Yes I will let you know.

Regards
Shamin

 

Please browse our web site to find out more about
access.training and other Microsoft training courses.

Access tip:

Label printing

You can create a report in Access for printing labels All you have to do is is click New under the Reports object and then select Label Wizard and follow the steps

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard