Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default format text through vba

I use the following code to insert a line of text into a quote sheet:

Worksheets(QuoteForm).Range("A" & DataRow).Value = "Additional Delivery Fee
of $" & Worksheets("Calculations").Range("PartialFreightPr ice").Text & " /
Delivery if customer request additional deliveries"

Is there a way I can make the
Worksheets("Calculations").Range("PartialFreightPr ice").Text BOLD?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default format text through vba

Steve,
You have to work with the .characters property of the range, similar to
MID( ).
Something like this :

dim PriceStr as string
const Msg as string=""Additional Delivery Fee of $"
pricestr=Worksheets("Calculations").Range("Partial FreightPrice").Text
With Worksheets(QuoteForm).Range("A" & DataRow)
.Value = Msg & pricestr & " / Delivery if customer request additional
deliveries"
.Characters(len(msg)+1,len(pricestr).font.bold=tru e
end with

NickHK

"steve" ...
I use the following code to insert a line of text into a quote sheet:

Worksheets(QuoteForm).Range("A" & DataRow).Value = "Additional Delivery
Fee
of $" & Worksheets("Calculations").Range("PartialFreightPr ice").Text & " /
Delivery if customer request additional deliveries"

Is there a way I can make the
Worksheets("Calculations").Range("PartialFreightPr ice").Text BOLD?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default format text through vba

very nice....thank you!

"NickHK" wrote:

Steve,
You have to work with the .characters property of the range, similar to
MID( ).
Something like this :

dim PriceStr as string
const Msg as string=""Additional Delivery Fee of $"
pricestr=Worksheets("Calculations").Range("Partial FreightPrice").Text
With Worksheets(QuoteForm).Range("A" & DataRow)
.Value = Msg & pricestr & " / Delivery if customer request additional
deliveries"
.Characters(len(msg)+1,len(pricestr).font.bold=tru e
end with

NickHK

"steve" ...
I use the following code to insert a line of text into a quote sheet:

Worksheets(QuoteForm).Range("A" & DataRow).Value = "Additional Delivery
Fee
of $" & Worksheets("Calculations").Range("PartialFreightPr ice").Text & " /
Delivery if customer request additional deliveries"

Is there a way I can make the
Worksheets("Calculations").Range("PartialFreightPr ice").Text BOLD?





Reply
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
Need help with converting CUSTOM format/TEXT format to DATE format Deo Cleto Excel Worksheet Functions 6 June 2nd 09 08:14 PM
Change Date Format to Specific Text Format When Copying [email protected] Excel Discussion (Misc queries) 4 December 23rd 08 03:43 PM
how to format a Docmd to pull in an Access file in Text format Campbellj4 Excel Programming 0 November 2nd 05 04:22 PM
how to format a Docmd to pull in an Access file in Text format Campbellj4[_2_] Excel Programming 0 November 2nd 05 04:22 PM
how to format excel format to text format with separator "|" in s. azlan New Users to Excel 1 January 31st 05 12:57 PM


All times are GMT +1. The time now is 05:38 PM.

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"