![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 2
|
I am creating an Excel spreadsheet from a table in Access 97.
For intCounter = 2 To rsRecord.fields.Count - 1 intCount = intCount + 1 oSheet.range("A" & intCount).Value = IIf(IsNull(rsRecord.fields(intCounter)), "N/A", rsRecord.fields(intCounter)) Next Table contents: 0 9 >576 PASS Excel after running my code: A 1 0 2 4 3 >576 4 PASS Populating Excel is working fine. I have a second Excel spreadsheet that links to my newly created spreadsheet and pulls the values from the specific cells. In my second spreadsheet I need to do calculations on A1 and A2 but the field format for these cells all are General which means I can't do a numeric calculation on it - if(NewSpreadsheet![A2] >5, ">0", NewSpreadsheet![a2]), the result always turns out to be true. I know the code in Access to check to see if the value is numeric before I write it to Excel. (Sometimes the value in A2 will be ">15", this is why I need to check to see its value.) What code do I need in Access to format the cell to be numeric before I plug the value in? Thanks, Terry |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Posts: 2
|
I've solved it.
Thanks, Terry |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|