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 Date formatting cells w/ VBA

I am trying to format a cell when creating an excel spreadsheet from an
access module. I would like to define the format of the cells from the
vb code itself, but I don't know how exactly.

Here is the pertinent code for how I am putting info into the cells
from my DB:

Dim oExcel As Excel.Application
Dim oWorkbook As Excel.Workbook

Set oExcel = CreateObject("Excel.Application")
oExcel.Visible = True
Set oWorkbook = oExcel.Workbooks.Add

oWorkbook.ActiveSheet.Cells(1, 1).Value = "FirstName"
oWorkbook.ActiveSheet.Cells(1, 2).Value = "LastName"
oWorkbook.ActiveSheet.Cells(1, 3).Value = "Arrival Date"

Anywho thanks, if anyone knows this. It seems like it should be
simple, but web searching is only showing me GUI-based solutions.

/r
kkoechel

 
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
Conditional Formatting and cloring cells and date calculations John Excel Worksheet Functions 1 July 16th 09 11:05 PM
Stop automatic formatting of cells (number, text, date, etc) Marcela Excel Worksheet Functions 4 June 9th 08 08:09 PM
Using Conditiona l Formatting to flag cells with a date in the pas Carla Excel Discussion (Misc queries) 6 April 25th 08 07:17 PM
Date formatting when combining two cells into one KimberlyC Excel Worksheet Functions 2 December 20th 04 10:45 PM
Excel VBA Formatting cells by Date Range koala Excel Programming 9 August 16th 04 05:55 PM


All times are GMT +1. The time now is 06:35 AM.

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

About Us

"It's about Microsoft Excel"