98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum 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
Resolved · Low Priority · Version 2007
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
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
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
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
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:How To Find All Overdue Accounts?To find overdue accounts create a filter that compares today's date with the Invoice Date in the table. To do this: |