dbTalk Databases Forums  

Formatting Excel through VBA

comp.database.ms-access comp.database.ms-access


Discuss Formatting Excel through VBA in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
janthony
 
Posts: n/a

Default Formatting Excel through VBA - 08-01-2003 , 03:04 PM






I've got a program that creates different spreadsheets in Excel, then
after I create them, I run some code that is suppose to go through the
spreadsheet and format it, such as setting certain fields to bold
text, etc.

The problem I keep having is that it works fine the first time I run
it, but then after that the formatting part stops working. Everything
else works as normal.

If I shut Access altogether, it works fine the first time I run it
again.

Any ideas of what is getting hung up?

John

Reply With Quote
  #2  
Old   
Ira Solomon
 
Posts: n/a

Default Re: Formatting Excel through VBA - 08-02-2003 , 03:30 PM






John:

Not a solution, but..

What I did when I needed formatted sheets whas to create a template
sheet with all formatting in it. Then I copied the sheet to a new
name in the code and wrote in the data. The formatting in the origanl
file was maitained. I don't don't know if this would work for you.

If I understand your problem you format sheet1 and it works.
You then format sheet2 and it doesn't.
Try closing excel between the sheets and see if that helps.
Just a guess.

Good Luck
Ira Solomon

On 1 Aug 2003 13:04:27 -0700, janthony (AT) harrahs (DOT) com (janthony) wrote:

Quote:
I've got a program that creates different spreadsheets in Excel, then
after I create them, I run some code that is suppose to go through the
spreadsheet and format it, such as setting certain fields to bold
text, etc.

The problem I keep having is that it works fine the first time I run
it, but then after that the formatting part stops working. Everything
else works as normal.

If I shut Access altogether, it works fine the first time I run it
again.

Any ideas of what is getting hung up?

John


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.