Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Financial Reporter macro

Financial Reporter macro

Financial Reporter macro


I'm trying to write an ACCPAC VB macro to run an FR excel report.  The report that it runs is a standard  excel spreadsheet created in FR.  However the file produced is a .001 text file...meaning I lose all the formatting.

How can write this code to produce an .xls file with the same format as the original??

RE: Financial Reporter macro

Write another procedure to rename the file as *.xls and call the procedure straight after the *.001 file has been printed to file by FR. See below (assuming *.001 file has been saved in "C:\clients\temp\")

I wrote this code in excel, so make sure Excel object library is active in Tools / References
Hope this works for you

 Sub moveFile()
    Dim dirName As String
    Dim oldName As String
    Dim newName As String
'set the directory to be checked
    dirName = "C:\clients\temp\"
'query for source file in the directory
    oldName = Dir(dirName & "quikbal*.*")
    oldName = dirName & oldName
    newName = "c:\clients\John\sales_John_" & MonthName(Month(Date), True) & Year(Date) & ".xls"
    fileCopy oldName, newName
    Kill oldName
End Sub

RE: Financial Reporter macro

Cheers Striderman , right on the money  thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close