472,780 Members | 1,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,780 software developers and data experts.

output to excel question

Hi,
I have this code in the groupheader_print section of an AccessXP
report. What is the code to 'Bold' the text288 cell.
thanks
bobh.

'this is the rpting category header
wks.Cells(row, 1) = Me.Text288

'move the active cell down one row
row = row + 1

Oct 23 '07 #1
7 2200
On Oct 23, 1:40 pm, bobh <vulca...@yahoo.comwrote:
Hi,
I have this code in the groupheader_print section of an AccessXP
report. What is the code to 'Bold' the text288 cell.
thanks
bobh.

'this is the rpting category header
wks.Cells(row, 1) = Me.Text288

'move the active cell down one row
row = row + 1
I think you need to set the formatting of the excel worksheet within
excel.

Oct 23 '07 #2


Here is a bit of code

With MyXL.Application
If .Worksheets(i).Name <SheetName Then ' Name changed
.Worksheets(i).Name = SheetName
End If
.Worksheets(i).Activate
.Range("A1:Q100").Clear
.Range("A1:Q100").Font.Size = FontSize10_9
.Range("A1:Q100").Font.Bold = False
'.Range("A1:Q6").Font.Name = "Arial"
'.Range("A7:Q100").Font.Name = "Arial Narrow" ' To make more room
.Range("A1:Q100").Font.Name = "Arial"
.Range("H7:Q100").Font.Name = "Arial Narrow" ' Race Results To
make more room

.Cells(1, 1).Font.Size = FontSize14_12
.Cells(1, 1).Font.Color = 255
.Cells(1, 1).Font.Bold = True
.Cells(1, 1).Value = "Overall Results " & Frm!SeriesName
End With

May be of help
Phil
"DavidB" <je***@yahoo.comwrote in message
news:11*********************@i13g2000prf.googlegro ups.com...
On Oct 23, 1:40 pm, bobh <vulca...@yahoo.comwrote:
>Hi,
I have this code in the groupheader_print section of an AccessXP
report. What is the code to 'Bold' the text288 cell.
thanks
bobh.

'this is the rpting category header
wks.Cells(row, 1) = Me.Text288

'move the active cell down one row
row = row + 1

I think you need to set the formatting of the excel worksheet within
excel.

Oct 23 '07 #3
This -- .Cells(1, 1).Font.Bold = True <-- was exactly what I was
looking for

Thanks :)
bobh.

On Oct 23, 3:09 pm, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
Here is a bit of code

With MyXL.Application
If .Worksheets(i).Name <SheetName Then ' Name changed
.Worksheets(i).Name = SheetName
End If
.Worksheets(i).Activate
.Range("A1:Q100").Clear
.Range("A1:Q100").Font.Size = FontSize10_9
.Range("A1:Q100").Font.Bold = False
'.Range("A1:Q6").Font.Name = "Arial"
'.Range("A7:Q100").Font.Name = "Arial Narrow" ' To make more room
.Range("A1:Q100").Font.Name = "Arial"
.Range("H7:Q100").Font.Name = "Arial Narrow" ' Race Results To
make more room

.Cells(1, 1).Font.Size = FontSize14_12
.Cells(1, 1).Font.Color = 255
.Cells(1, 1).Font.Bold = True
.Cells(1, 1).Value = "Overall Results " & Frm!SeriesName
End With

May be of help
Phil"DavidB" <je...@yahoo.comwrote in message

news:11*********************@i13g2000prf.googlegro ups.com...
On Oct 23, 1:40 pm, bobh <vulca...@yahoo.comwrote:
Hi,
I have this code in the groupheader_print section of an AccessXP
report. What is the code to 'Bold' the text288 cell.
thanks
bobh.
'this is the rpting category header
wks.Cells(row, 1) = Me.Text288
'move the active cell down one row
row = row + 1
I think you need to set the formatting of the excel worksheet within
excel.- Hide quoted text -

- Show quoted text -

Oct 23 '07 #4
Any example of what 'alignment' looks like??
I tried
..Cells(1, 1).Alignment = Center ;nope
..Cells(1, 1).Alignment.Center = True ; nope

bobh.

On Oct 23, 3:09 pm, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
Here is a bit of code

With MyXL.Application
If .Worksheets(i).Name <SheetName Then ' Name changed
.Worksheets(i).Name = SheetName
End If
.Worksheets(i).Activate
.Range("A1:Q100").Clear
.Range("A1:Q100").Font.Size = FontSize10_9
.Range("A1:Q100").Font.Bold = False
'.Range("A1:Q6").Font.Name = "Arial"
'.Range("A7:Q100").Font.Name = "Arial Narrow" ' To make more room
.Range("A1:Q100").Font.Name = "Arial"
.Range("H7:Q100").Font.Name = "Arial Narrow" ' Race Results To
make more room

.Cells(1, 1).Font.Size = FontSize14_12
.Cells(1, 1).Font.Color = 255
.Cells(1, 1).Font.Bold = True
.Cells(1, 1).Value = "Overall Results " & Frm!SeriesName
End With

May be of help
Phil"DavidB" <je...@yahoo.comwrote in message

news:11*********************@i13g2000prf.googlegro ups.com...
On Oct 23, 1:40 pm, bobh <vulca...@yahoo.comwrote:
Hi,
I have this code in the groupheader_print section of an AccessXP
report. What is the code to 'Bold' the text288 cell.
thanks
bobh.
'this is the rpting category header
wks.Cells(row, 1) = Me.Text288
'move the active cell down one row
row = row + 1
I think you need to set the formatting of the excel worksheet within
excel.- Hide quoted text -

- Show quoted text -

Oct 23 '07 #5

..HorizontalAlignment = xlCenter

If you're using late binding, replace xlCenter with -4108.
By the way, recording a macro in Excel, which creates a VBA macro in
Excel, and then examining that macro is the fastest way to find out
how to do something in Excel. (Most of the time anyways...)
On Tue, 23 Oct 2007 12:55:55 -0700, bobh <vu******@yahoo.comwrote:
>Any example of what 'alignment' looks like??
I tried
.Cells(1, 1).Alignment = Center ;nope
.Cells(1, 1).Alignment.Center = True ; nope

bobh.

On Oct 23, 3:09 pm, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
>Here is a bit of code

With MyXL.Application
If .Worksheets(i).Name <SheetName Then ' Name changed
.Worksheets(i).Name = SheetName
End If
.Worksheets(i).Activate
.Range("A1:Q100").Clear
.Range("A1:Q100").Font.Size = FontSize10_9
.Range("A1:Q100").Font.Bold = False
'.Range("A1:Q6").Font.Name = "Arial"
'.Range("A7:Q100").Font.Name = "Arial Narrow" ' To make more room
.Range("A1:Q100").Font.Name = "Arial"
.Range("H7:Q100").Font.Name = "Arial Narrow" ' Race Results To
make more room

.Cells(1, 1).Font.Size = FontSize14_12
.Cells(1, 1).Font.Color = 255
.Cells(1, 1).Font.Bold = True
.Cells(1, 1).Value = "Overall Results " & Frm!SeriesName
End With

May be of help
Phil"DavidB" <je...@yahoo.comwrote in message

news:11*********************@i13g2000prf.googlegr oups.com...
On Oct 23, 1:40 pm, bobh <vulca...@yahoo.comwrote:
Hi,
I have this code in the groupheader_print section of an AccessXP
report. What is the code to 'Bold' the text288 cell.
thanks
bobh.
>'this is the rpting category header
wks.Cells(row, 1) = Me.Text288
>'move the active cell down one row
row = row + 1
I think you need to set the formatting of the excel worksheet within
excel.- Hide quoted text -

- Show quoted text -
Please Post Any Replies To This Message Back To the Newsgroup.
There are "Lurkers" around who can benefit by our exchange!
Oct 23 '07 #6

With MyXL.Application
.Columns("A").ColumnWidth = 7 ' Position
.Range("A9:A100").Font.Bold = True
.Columns("B").ColumnWidth = 20 ' Boat name
.Columns("C").ColumnWidth = ColumnWidth10_9 ' Sail No
If Frm!ResultTypeIDRelay = 1 Then ' Combined
.Columns("D").ColumnWidth = ColumnWidth10_9 ' Division
.Columns("D").HorizontalAlignment = xlRight ' Right
ElseIf Frm!ResultTypeIDRelay = 2 Then ' Division
.Columns("D").ColumnWidth = 0 ' Division
ElseIf Frm!ResultTypeIDRelay = 4 Then ' Boat Class
.Columns("D").ColumnWidth = ColumnWidth10_9 ' Division
.Columns("D").HorizontalAlignment = xlRight ' Right
End If
.Columns("E").ColumnWidth = 6 ' Club
.Columns("F").ColumnWidth = 6 ' Total Points
.Columns("G").ColumnWidth = 6 ' Total Ex Discards
.Columns("G").Font.Bold = True ' Total Ex Discards
.Columns("H").ColumnWidth = ColumnWidths8Quart_7Quart ' Races
.Columns("I").ColumnWidth = ColumnWidths8Quart_7Quart
.Columns("J").ColumnWidth = ColumnWidths8Quart_7Quart
.Columns("K").ColumnWidth = ColumnWidths8Quart_7Quart
.Columns("L").ColumnWidth = ColumnWidths8Quart_7Quart
.Columns("M").ColumnWidth = ColumnWidths8Quart_7Quart
.Columns("N").ColumnWidth = ColumnWidths8Quart_7Quart
.Columns("O").ColumnWidth = ColumnWidths8Quart_7Quart
.Columns("P").ColumnWidth = ColumnWidths8Quart_7Quart
.Columns("Q").ColumnWidth = ColumnWidths8Quart_7Quart
.Range("F7:G8").HorizontalAlignment = xlRight ' right
.Range("H7:Q100").HorizontalAlignment = xlCenter ' center
.Range("H7:Q100").Font.Color = 16711680 ' blue
.Cells(2, 1).Font.Size = FontSize14_12
.Cells(2, 1).Font.Color = 255
.Cells(2, 1).Font.Bold = True

More bits

Phil
"bobh" <vu******@yahoo.comwrote in message
news:11*********************@i13g2000prf.googlegro ups.com...
Any example of what 'alignment' looks like??
I tried
.Cells(1, 1).Alignment = Center ;nope
.Cells(1, 1).Alignment.Center = True ; nope

bobh.

On Oct 23, 3:09 pm, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
>Here is a bit of code

With MyXL.Application
If .Worksheets(i).Name <SheetName Then ' Name changed
.Worksheets(i).Name = SheetName
End If
.Worksheets(i).Activate
.Range("A1:Q100").Clear
.Range("A1:Q100").Font.Size = FontSize10_9
.Range("A1:Q100").Font.Bold = False
'.Range("A1:Q6").Font.Name = "Arial"
'.Range("A7:Q100").Font.Name = "Arial Narrow" ' To make more
room
.Range("A1:Q100").Font.Name = "Arial"
.Range("H7:Q100").Font.Name = "Arial Narrow" ' Race Results To
make more room

.Cells(1, 1).Font.Size = FontSize14_12
.Cells(1, 1).Font.Color = 255
.Cells(1, 1).Font.Bold = True
.Cells(1, 1).Value = "Overall Results " & Frm!SeriesName
End With

May be of help
Phil"DavidB" <je...@yahoo.comwrote in message

news:11*********************@i13g2000prf.googlegr oups.com...
On Oct 23, 1:40 pm, bobh <vulca...@yahoo.comwrote:
Hi,
I have this code in the groupheader_print section of an AccessXP
report. What is the code to 'Bold' the text288 cell.
thanks
bobh.
>'this is the rpting category header
wks.Cells(row, 1) = Me.Text288
>'move the active cell down one row
row = row + 1
I think you need to set the formatting of the excel worksheet within
excel.- Hide quoted text -

- Show quoted text -


Oct 23 '07 #7
On Oct 23, 5:55 pm, Chuck Grimsby <c.grim...@worldnet.att.net.invalid>
wrote:
.HorizontalAlignment = xlCenter

If you're using late binding, replace xlCenter with -4108.

By the way, recording a macro in Excel, which creates a VBA macro in
Excel, and then examining that macro is the fastest way to find out
how to do something in Excel. (Most of the time anyways...)

On Tue, 23 Oct 2007 12:55:55 -0700, bobh <vulca...@yahoo.comwrote:
Any example of what 'alignment' looks like??
I tried
.Cells(1, 1).Alignment = Center ;nope
.Cells(1, 1).Alignment.Center = True ; nope
bobh.
On Oct 23, 3:09 pm, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
Here is a bit of code
With MyXL.Application
If .Worksheets(i).Name <SheetName Then ' Name changed
.Worksheets(i).Name = SheetName
End If
.Worksheets(i).Activate
.Range("A1:Q100").Clear
.Range("A1:Q100").Font.Size = FontSize10_9
.Range("A1:Q100").Font.Bold = False
'.Range("A1:Q6").Font.Name = "Arial"
'.Range("A7:Q100").Font.Name = "Arial Narrow" ' To make more room
.Range("A1:Q100").Font.Name = "Arial"
.Range("H7:Q100").Font.Name = "Arial Narrow" ' Race Results To
make more room
.Cells(1, 1).Font.Size = FontSize14_12
.Cells(1, 1).Font.Color = 255
.Cells(1, 1).Font.Bold = True
.Cells(1, 1).Value = "Overall Results " & Frm!SeriesName
End With
May be of help
Phil"DavidB" <je...@yahoo.comwrote in message
>news:11*********************@i13g2000prf.googlegr oups.com...
On Oct 23, 1:40 pm, bobh <vulca...@yahoo.comwrote:
Hi,
I have this code in the groupheader_print section of an AccessXP
report. What is the code to 'Bold' the text288 cell.
thanks
bobh.
'this is the rpting category header
wks.Cells(row, 1) = Me.Text288
'move the active cell down one row
row = row + 1
I think you need to set the formatting of the excel worksheet within
excel.- Hide quoted text -
- Show quoted text -

Please Post Any Replies To This Message Back To the Newsgroup.
There are "Lurkers" around who can benefit by our exchange!- Hide quoted text -

- Show quoted text -

That works, thanks :)

Oct 25 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Beowulf | last post by:
Hi, I have an XML file generated by a third party (and therefore unchangable) program. 1st line in it is <?xml version="1.0" encoding="us-ascii"?> and down in the depths of the xml I have a...
2
by: cpeters5 | last post by:
Deaa group, I am using SQLServer 2000 in an XP Sp2. I would like to do the following: I have a program running on a database server that generates some data which are loaded to the database....
20
by: SR | last post by:
Hi, I need to read the output from a system( ) function within a C program. The function however only returns the exit status. How can I read what system( ) sends to stdout ? (is there a simpler...
6
by: Mark Rae | last post by:
Hi, My client has asked me to provide a "quick and dirty" way to export the contents of a DataGrid to both Excel for analysis and Word for editing and printing, so I'm investigating client-side...
0
by: ed | last post by:
Hello All. I have seen many posts slightly similar to this question with no answer. Maybe you have some FAQs or something, sorry if I looks repetitive. Here is my Problem: In my...
8
by: Fendi Baba | last post by:
I created an ASP.net page which opens excel. The data opens up correctly in MS office Excel 2007 but when we use a mahcine with MS Office 2003 we encountered a message, "Cannot read output file" Is...
2
by: John Bartley K7AAY | last post by:
When I output a table's values to XLS, one value in a very small table, and only one value, is changed. Here are the values in the table, tblLevel. LEVEL H-14 0 1 1.1
7
by: zdravko.monov | last post by:
Hi there! I need a C++ library that can organize and write scientific (and numerical overall) data in tables. I have been fighting with std::ofstream and plain ASCII files, but it is difficult to...
11
by: JRough | last post by:
I'm trying to use output buffering to cheat so i can print to excel which is called later than this header(). header("Content-type: application/xmsdownload"); header("Content-Disposition:...
0
by: sivadhanekula | last post by:
Hi all, I have to do a project in excel by usung vb. The coding part is done and I am getting the output in .CSV format. when doing project in the main excel sheet I will be having 3 sheets and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.