Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / May 2005

Tip: Looking for answers? Try searching our database.

Formatting an Excel from Access vba.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CyndyG - 26 May 2005 16:47 GMT
I have an Excel spreadsheet that is created each time an Access form is
executed.

wks.cells(j, .Fields("MonthNumber") * 2 + 1) = .Fields("Total")
  .MoveNext

Could some one tell what I code to format the Total field in an accounting
format . When I ran an Excel Macro this is the code I received:
Range("K3").Select
   Selection.NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($*
""-""??_);_(@_)"
which is what I want,but don't know how to get it to be accepted in Access.

I am getting errors such as method not found  or invalid format.
Klatuu - 26 May 2005 17:19 GMT
Cyndy,

I have had the same problem.  It doesn't make sense to me that passing an
Excel format from Access should object to Excel formatting; however, try this
and see if it gives you the result you need:

Selection.NumberFormat = "$#,##0.00);($#,##0.00);"-""

> I have an Excel spreadsheet that is created each time an Access form is
> executed.
[quoted text clipped - 10 lines]
>
> I am getting errors such as method not found  or invalid format.
CyndyG - 26 May 2005 18:47 GMT
THanks,but still does not work,

> Cyndy,
>
[quoted text clipped - 18 lines]
> >
> > I am getting errors such as method not found  or invalid format.
Klatuu - 26 May 2005 18:58 GMT
Try it this way

Selection.NumberFormat = "$#,##0.00);($#,##0.00); - "

> THanks,but still does not work,
>
[quoted text clipped - 20 lines]
> > >
> > > I am getting errors such as method not found  or invalid format.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.