LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Numberformat for Cells using Automation

Hi there,

I have a procedure in Access that exports data to an Excel worksheet. Can
anyone here help me with the finer side of Excel VBA and it methods, please?

I have the following code so far:

Public gobjExcel As Excel.Application 'global variable
-------------------------------------------------------
Private Sub cmdExportieren_Click() 'actual procedure

Dim objWS As Excel.Worksheet

gobjExcel.Workbooks.Add
objWS.Range("A2").CopyFromRecordset rstData, 1000 'export
gobjExcel.Range("A1").Select

'code I want must go here

end sub

---------------------------------------------

So what I want in VBA is that I check the cell contents in a specific range,
and when the cell contents has a number in it, it must be a decimal value
with only 1 place after the comma.
Can this be written with an IF loop inside the VBA of Access?

I am grateful for any tips, or if someone can maybe point to a resource on
the web where this is explained.

Kind Regards,
Jean




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel automation through .NET Interop: NumberFormat property looks like NumberFormatLocal martin durtschi Excel Programming 4 May 13th 14 07:39 PM
numberformat? Jack Sons Excel Discussion (Misc queries) 3 September 4th 07 03:44 PM
using cells.numberformat maxzsim Excel Worksheet Functions 2 May 6th 05 10:41 AM
Writing Localized Strings In Cells Using Automation VirGin Excel Discussion (Misc queries) 0 March 7th 05 01:04 PM
NumberFormat strings for Excel Cells R. L. Alan Jordan Excel Programming 2 July 26th 03 02:33 AM


All times are GMT +1. The time now is 11:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"