How Do I Make A Portion Of Text In Word Cell Bold?
I've created a word template with a table in it.
In one cell I am entering multiple lines. I'd like the first line (the name) to be bold.
I'm using asp and cannot figure out the correct property to call.
Here is part of the source code:
Code: Set objWord = CreateObject("Word.Application") ' Create a Word object. Set WordDoc = objWord.Documents.Add("C:Incident.dot") ' Start a document. objWord.Application.Visible = False
With WordDoc Open recordset here
Code: Do While Not rsPeopleList.EOF .Tables(7).Cell(row, col).Range.InsertAfter (rsPeopleList("LastName") & ", " & rsPeopleList("FirstName") & " " & rsPeopleList("MiddleName")) .Tables(7).Cell(row, col).Range.InsertAfter (vbcrlf & vbcrlf) If rsPeopleList("EmployeeRole") = "" Then .Tables(7).Cell(row, col).Range.InsertAfter (vbcrlf) Else .Tables(7).Cell(row, col).Range.InsertAfter (rsPeopleList("EmployeeRole") & vbcrlf) End If .Tables(7).Cell(row, col).Range.InsertAfter ("Employee Number:" & vbTab) If rsPeopleList("EmployeeID")="" Then .Tables(7).Cell(row, col).Range.InsertAfter (vbcrlf) Else .Tables(7).Cell(row, col).Range.InsertAfter (rsPeopleList("EmployeeID") & vbcrlf) End If ...
Thanks,
Julie
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Make Text Bold In Word
hello,
i'm inserting some text into word from visual basic. i use the following code:
Code:
MyWordApp.ActiveDocument.Bookmarks("Equipment").Range.InsertAfter Text:=lstItemsOrdered.List(i)
this works fine. i want to know if there is anyway to make this text bold.
thanks for the help
cheers
Make Excel Cell Bold
how would i take a specific cell and make it bold...
IE
ExcelApp.Range("A1").Value = "TEST"
now how would I make TEST bold via code?
How To Make A Cell's Font BOLD && Color RED Using If Condition In MSHFlexgrid?
Dear Friends,
How to make a cell's font to BOLD & font color to RED using if condition in MSHFlexgrid?
I want to modify the following code to get the above result:
Code:
Dim Y As Long
With MSHFlexGrid1
For Y = .FixedRows To .Rows - 1
.TextMatrix(Y, 5) = Format(.TextMatrix(Y, 5), ("###,###.00;;DELETED "))
Next Y
End With
The above code is working fine. But, now what I would like to do is to apply a if condition in the same code to get the following result:
If the cell value is "0.00" then it should fill the cell with "DELETED". Upto this level it is working fine. But I want to apply the condition that If Cell Value is equal to "DELETED" then it should change the Cell font to BOLD and color to RED. How can I do it?
Help me please.
vblearner6
MSWORD Making One Word Bold In A Table Cell.
Hi
I am creating a report in word using tables in VB6.
One of the cells contains a surname and then two foren
ames for married
partners. I need to have the surname in bold and the
forenames as
normal.
When I do this I can make the whole cell bold or n
ormal. Can anybody
help?
Regards
Peter
Important Note: This E-Mail is confidential, it must not
be read,
copied, disclosed or used by any person other than the
above
named addressees. Unauthorised use, disclosure or copying is
strictly prohibited and may be unlawful. Eurostar (U.K.) L
imited
and Eurostar Group Limited disclaim any liability for any
action
taken in reliance on the content of this E-Mail. The c
omments
or statements expressed in this E-Mail are not necessarily
those
of Eurostar (U.K.) Limited, Eurostar Group Limited or any
subsidiaries or affiliates of either company.
Eurostar (U.K.) Ltd. Registered Office: Eurostar House, Wate
rloo
Station, London, SE1 8SE, Registered in England No. 246200
1
VAT No. GB 657 719 590
Eurostar Group Ltd. Registered office: Eurostar House, Water
loo
Station, London, SE1 8SE, Registered in England No. 379464
2
VAT No. GB 739 974 173
This email has been scanned for all viruses by the Mes
sageLabs Email
Security System on behalf of Eurostar. For more informatio
n on a proactive email security service working around t
he clock, around the globe, visit http://www.messagelabs.com
Change Font Bold Of A Cell In A Table In Word From VB
I've used some code from johnwm in thread222-589129 some time ago to help me make the table. From that I've figured out how to change the "header row" background color. Now I'm trying to change the "header row" font to bold but I'm having diffieculty. Can someone help. Here is the how I change the color of row 1 for each column.
CODE'This will change the color of the header row in the table
With MyRange.Tables.ITEM(1)
For g = 1 To .Columns.Count
' .Cell(1, g).Select.Font.Bold = wdToggle
.Cell(1, g).Shading.BackgroundPatternColor = wdColorYellow
Next g
End With
How To Make Last Word In Textbox Bold?
Let's say, whenever the user clicks a command button, it'll make the last word in text1 bold. How do I go about doing this? I think I use the sellength code or sumthin.. but I'm not to sure, which is why I'm asking
How To Add Cell Comment With Bold Text
Hi,
I am trying to add a comment to a cell in Excel. Adding a comment is no problem but I want to be able to resize the comment and change the text to bold text.
Any ideas ??
Thanks
Steve
Make A Bold Checking In Word Document
Hi, can somebody pls tell me what I'm doing wrong here. I am getting a object error with the line
If wr.font.bold = true then.
i have inserted a bookmark named "First" and i need to check whether that the user has selected it and put it Bold. I know i'm doing some syntax declaration wrong but I am a newbie and I know know how to fix. Can someone pls help. I am attaching the whole document as well but i dont know whether attaching a .doc is valid attachment. Pls help
Private Sub cmdBold_Click()
Dim wr As Range
With ActiveDocument.Bookmarks
.Add Range:=Selection.range, Name:="First"
If wr.Font.Bold = True Then
MsgBox "True"
End If
End With
'Me.Hide
'UserForm2.Show vbModeless
End Sub
Make A Bold Toggle Button Like MS Word - Resolved
Everyone,
I have a rich text control and want to give the user the ability to insert formatting like bold, italics, and underline only. Through some playing around I found that a checkbox control using a graphical style is like a toggle button. I have also read through some other posts and have seen some various ideas about how to format the test in the RTF box. I would like the user to be able to just click the bold button begin typing in bold then click it again to turn it off or highlight a string and bold whatever is in the string. I've worked on this for about four hours, anyone have any ideas, thoughts, or references???
EDIT - Here's the link I finally found that solved my problem in case anyone else ever has this problem
Here's the site that helped me solve my problem
Learning how to do internet searches is actually harder than the programming language
rcw357
"The smartest man is the man who knows he knows nothing at all."
Edited by - rcw357 on 10/12/2003 12:00:23 PM
RTB - Make Whole Text Non-bold At Once
Hey,
I was wondering if it's possible to make the entire text in an RTB 'non-bold' (SelBold = False) all at once, without selecting the entire text and then setting SelBold to false...
I'm trying to create a 'bracket-shower' which in short:
- checks if the cursor is infront of a { bracket
- If yes - make that bracket bold
- If no, make the entire text non-bold (or in other words, 'delete' the boldness of any possible bold { brackets)
At the moment I'm using the following code:
vb Code:
Private Sub rtb_SelChange()Dim lSelStart As LonglSelStart = .SelStart 'This will make the selected bracket bold With rtb .SelStart = 0 .SelLength = Len(.Text) .SelBold = False .SelLength = 0 .SelStart = lSelStart If Mid$(.Text, lSelStart + 1, 1) = "{" Then 'Cursor in front of opening bracket 'Make bold .SelStart = lSelStart .SelLength = 1 .SelBold = True .SelLength = 0 End If End With End Sub
But obviously there are problems with the first part (making the text non-bold). Longer selections don't work (since the sellength is set to 0 directly after selecting...) and things like that... Also, sometimes, the selecting procedure can be seen by the user (you can see the text getting selected )
So is there any way of doing this?
How To Make Text Bold In Textbox
Hello, everyone.
Please someone help. I want to make selected text in a textbox bold and also want those selected text print bold on the printer. How do I do that? I know how make all the text in the textbox shown bold and print bold, but I am unable to make selected text bold. I know someone knows how.
Thank you for help in advance.
DanVue
Make The Selected Text Bold
Hi,
Now don't get me wrong, I'm no beginner but I just have not done this for a year so I have forgot. I want to select some text and make only the selected text bold when the bold button is pressed. I tried this:
------------------------------------
txtComment.Seltext = txtComment.Font.Bold
------------------------------------
What wrong here?
Thanks
How To Make Bold Text In One Textbox Bold In Another Textbox
I am writing a somewhat basic chat application, I was on the verge of releasing it when I spotted a bug. When I typed with bold text inside Text1, it only appeared normal inside Text2. Is there any way to have Text2 display the text formatting as well? I would also like to do this with the text colors.
[Solved] Make Selected Text Bold?
How would I go about making selected text in a textbox bold? I am aware how to make the whole contents of the text box bold, but not specific parts.
Thanks
How To Make Text In A Textbox Italic, Bold Or Underlined Etc...
Hi people,
I've been working on a simple project (to me it must be simple, because i am just aan vb noob;).
In my project i am using a multiline textbox with scrollbars, but only plain text shows up; offcourse.
How can I make up my text, like centrain words unerlined or italic or bold?
Thansk in advance
Find Text Then Bold It Via VB6 And Word
I'm trying to programmatically make a phrase bold and underlined within a Word document text that I generate from a VB6 app. Ideally I'd like to do this right as the text is added to the document, but I don't think there's a way to do this since the text I insert comes from the database (I do wonder if it can be done when I'm hardcoding text that goes into a Word document from VB6, this can also be useful to me).
At any rate, once text is inserted into Word from the database, I go to a bookmark, then I'm try to find the first instance of a specific phrase after the bookmark and make it bold & underlined. Is there a way to do this? Here's my snippet that didn't work:
Code:
WordDoc.Bookmarks("blah_blah").Select
With WordDoc.Bookmarks("blah_blah").Range.Find
.Text = "blah"
.Replacement.Text = "blah"
With .Replacement.Text
.Bold = True
.Underline = True
End With
End With
Thanks
~Laz
WORD AUTOMATION && BOLD TEXT
You will mock me for years!.. but I could not set a row of a word table in BOLD style!! I have to turn a bi-dimensional array in a word table... and when I met the "§B§" string in a cell, set that row to BOLD.
rTot: Number of rows of the array.
cTot: Number of columns of the array.
Wtab: Word table
mycell: string
matrix: bi-dimensional array of strings
------------------------------------------------------------------------
For R = 1 To rTot
RowBold = False
For c = 1 To cTot
mycell = CStr(Matrix(R, C))
If InStr(mycell, "§B§") <> 0 Then
mycell = Left(mycell, Len(mycell) - 3)
RowBold = True
End If
Wtab.cell(R, c).Range.Text = mycell
If IsNumeric(mycell) Then Wtab.cell(R, c).Range.ParagraphFormat.Alignment = 2
Next
If RowBold = True Then
Wtab.Rows.item(R).Range.Font.Bold = True
End If
Next
-------------------------------------------------------
The Wtab.Rows.item(R).Range.Font.Bold = True statement should work... Or, at least, this is what I read in several forums...
HELP!!!
Word Automation && Bold Text [HELP!]
You will mock me for years!.. but I could not set a row of a word table in BOLD style!! I have to turn a bi-dimensional array in a word table... and when I met the "§B§" string in a cell, set that row to BOLD.
rTot: Number of rows of the array.
cTot: Number of columns of the array.
Wtab: Word table
mycell: string
matrix: bi-dimensional array of strings
------------------------------------------------------------------------
For R = 1 To rTot
RowBold = False
For c = 1 To cTot
mycell = CStr(Matrix(R, C))
If InStr(mycell, "§B§") <> 0 Then
mycell = Left(mycell, Len(mycell) - 3)
RowBold = True
End If
Wtab.cell(R, c).Range.Text = mycell
If IsNumeric(mycell) Then Wtab.cell(R, c).Range.ParagraphFormat.Alignment = 2
Next
If RowBold = True Then
Wtab.Rows.item(R).Range.Font.Bold = True
End If
Next
-------------------------------------------------------
The Wtab.Rows.item(R).Range.Font.Bold = True statement should work... Or, at least, this is what I read in several forums...
HELP!!!
Recolor / Bold A Select Word In Text Box
I am working on my own IDE for a programming language called Lua (mainly used for video game mods (I use it a lot)), and I need to figure out how to do syntax highlighting.
I've seen a lot of things with Replace$ and whatnot, but I don't know that much about VB6 (the package I'm using for this).
Basically, I need to color select words blue, and make them bold.
Say I need to recolor the word "function", how would I go about doing that.
I would want it to be in real time, not line by line basis like VB6 does. Meaning that as soon as I finish the word, the new settings would take effect.
Word Automation - How To Insert Text And Set To Bold?
I'm dynamically creating Word docs in my VB6 app.
I'm using Word 2002 (v10).
In most cases I find and replace a marker field [keyName] in the template with some content from my app.
This works fine and allows the user to set the style of the text by setting the marker field (it's replaced in the same style).
I now have a piece of content that needs to be formatted by the code.
Basically I'd like:
Header 1
Para
Header 2
Para
Para
Para
Header 3
Para
Para
I've tried setting the Font to Bold but it doesn't work as I anticipate
In fact I get this!
Header 1
Para
Header 2
Para
Para
Para
Header 3
Para
Para
Here's the code:
Code:
With WordApp
' Find the insertion point
With .Selection.Find
.Forward = True
.ClearFormatting
.MatchWholeWord = True
.MatchCase = False
.Wrap = wdFindContinue
.Text = insertAfter ' The marker in the template
found = .Execute
End With
If Not found Then Exit Sub
With .Selection
' Collapse the selection and move to the end
.Collapse wdCollapseEnd
' Get the data...
Dim com As ADODB.Command
Set com = New ADODB.Command
With com
.ActiveConnection = MDImain.db.cnn
.CommandType = adCmdStoredProc
.CommandText = "qryQuoteOptionSectionsDetails " & optionID & ", " & quoteID
Set rsSections = .Execute
End With
optionTotal = 0
Do While Not rsSections.EOF
' Section description should be highlighted
fieldValue = rsSections!description & vbCr
.Font.Bold = True
.insertAfter fieldValue
' Reset font
.Font.Bold = False
' Get more data...this should not be bold
fieldValue = "<more data with carriage returns>"
.insertAfter fieldValue & vbCr
rsSections.MoveNext
Loop
rsSections.Close
End With
End With
I've tried everything I can think of but I'm just guessing now!
Any ideas!?
Mac
Edited by - AbbydonKrafts on 10/15/2006 3:02:39 PM
How To Make A Portion Of A Map Transparent Using Vb.
hello all,
i have a loaded a .bmp map on the form.It is a colored map.
now i select a portion (polygon shaped region on the map)by clicking
points on the map using mouse.those polygon shaped lines are
single-colored.now i do propogation on the map after which my map changes
to entire green color.now my problem is i want to view this polygon shaped
region below this green colored map as a transparent region.can anybody
help me out.
thanku waiting for the reply
-vijireddy
How To Make A Selected Portion Transparent
i have loaded a .bmp map on the form using vb.loaded map is a colored map.
now i have selected a portion on the map(polygon shaped region)
i'm propogating the entire map...the entire map changes its
color to green.......now i want to make the polygon shaped marked region look transparent or opaque under the map looking green now.......
how can i do this?
[Cimperiali: closed the poll as this is not a poll]
Make Certain Text In ListBox As "BOLD"
Is it possible to make certain text in ListBox as "BOLD"
I have following code:
PerfMeas = "Never Arrived:" + " " + CStr(NEVER) + " " + CStr(Format(NEVERPERC, "##0.0")) + " %"
List1.AddItem PerfMeas
How do I make all the text of PerfMeas "bold" in a listbox.
I also have other stuff populated in a listbox. I only need text of certain lines in listbox to be "bold". The Font property of listbox makes allthe text in listbox as "bold".
Any thoughts !!!
Find A 'bold' Cell And Do...
G'day,
I'm trying to get a wee programme (using VBA) to search a work sheet (sheet1) from cell F5 (right and down) for all cells that contain bold.
For each cell that is bold I'd like to put a number (changes for each column) into the corresponding cell on another sheet (sheet2).
I've been mucking around with the
Code:
Set blob = .find(parameters)
but I'm not quite sure how it all works.
I think it's important to store the location (eg. "G9") of each bold cell as a variable and move this across to the other sheet, but yeha, I'm quite stumped here. Perhaps creating a variable, for which a bold cell = true and for anyother cell = false, and going from there.
Any suggestions would be great!
Ta,
Goldmole
Bold/non-bold Text On CommandButton?
Is there any way to make PART of a CommandButton's Caption bold, and part of it not bold (normal)?
For example, if I wanted the first word to be bold and subsequent words to be NOT bold...how would one do that?
Selecting Text In A Word Table Cell
This has probably been answered many times before but I can't find the solution. I need to insert some text into a Word table and then change the font without affecting the text that was already in the cell. My code will look something like this:
Code:
Set oWord = CreateObject("Word.Application")
' Create a new Word document based on works_oder.dot template
oWord.application.Documents.Add App.Path & " emplatesworks_order.dot"
oWord.Visible = True
oWord.Activate
With oWord.ActiveDocument.tables(1) ' First table in Word template
.cell(1, 2).range.insertafter "Temp 0001"
.cell(2, 1).range.insertafter " " & cmbCustomers
.cell(2, 2).range.insertafter vbCrLf & txtDrawingNo
.cell(2, 4).range.insertafter vbCrLf & txtWorksOrderNo
.cell(3, 1).range.insertafter " " & txtCustOrderNo
.cell(4, 1).range.insertafter vbCrLf & txtRequiredBy
.cell(4, 2).range.insertafter vbCrLf & txtDescription
End With
I guess I need to select the text I've just added and then apply the font formatting I need, but I can't quite work out the syntax to select just the new text and exclude the original contents of the cell. Thanks!
Separate A Cell Value Based On Being Bold?
Suppose I have this value in a cell
text = "MY Name is Cheetah"
How to separate it (maybe using mid function) into
text1 = "My Name" or "My Name" &
text2 = "is Cheetah" ?
Thanks
Fill Text Box In Word With Data From Excel Cell
Hi,
I have a very simple problem (I hope it is simple):
I have a Text Box in Word with no text entered.
In Excel (Sheet 1, Cell A1) is a text, e.g. "Hello World".
In Word I would like to fill the Text Box with the cell of Excel A1.
Can someone post a simple macro of how to achieve this?
On top of that, is there a way to create Text Boxes dynamically in Word and position each created text box?
Thanks in advance!
How To Change The Fontstyle Of Single Word To Bold In Word Doc?
Hi Everybody !
Can anyone please help me change the font style of few words in a sentence to BOLD while generating a word document as output? Currently I am using the code as below & If I use .bold command it makes whole of the document as bold which i do not want.
Here is my code:
Private Sub comletter()
Dim oDoc As Word.Document
Dim oRange As Word.Range
Dim sTemp As String
'Show Word to the user
oWord.Visible = False
'Add a new, blank document
Set oDoc = oWord.Documents.Add
' Format Pagesetup'
With ActiveDocument.PageSetup
'.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.TopMargin = InchesToPoints(2.5)
.BottomMargin = InchesToPoints(0.75)
.LeftMargin = InchesToPoints(0.75)
.RightMargin = InchesToPoints(0.75)
.Gutter = InchesToPoints(0)
'.HeaderDistance = InchesToPoints(0.5)
'.FooterDistance = InchesToPoints(0.5)
.PageWidth = InchesToPoints(8.23)
.PageHeight = InchesToPoints(11.69)
'.FirstPageTray = wdPrinterDefaultBin
'.OtherPagesTray = wdPrinterDefaultBin
'.SectionStart = wdSectionNewPage
'.OddAndEvenPagesHeaderFooter = False
'.DifferentFirstPageHeaderFooter = False
'.VerticalAlignment = wdAlignVerticalCenter
'.SuppressEndnotes = False
'.MirrorMargins = False
End With
'Get the current document's range object
Set oRange = oDoc.Paragraphs(1).Range
sTemp = vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "Dated: " & Date
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbNewLine
sTemp = sTemp & "Letter No." & "Dated: "
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbNewLine
sTemp = sTemp & "sent on: "
sTemp = sTemp & vbNewLine
Set oRange = Nothing
oDoc.Paragraphs.Add
Set oRange = oDoc.Paragraphs(2).Range
oRange.ParagraphFormat.Alignment = wdAlignParagraphJustifyLow
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbTab & "This is to state that a letter has been posted on the above-mentioned address and that the date of the letter has been recorded in the Register on the ..........."
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbTab & "The payment of fee is required to be made within 3 months from the aforesaid date of recordal."
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbTab & "The Copy of Letter is enclosed and the receipt of the same may please be acknowledged"
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & " ( )"
sTemp = sTemp & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & " Kamal Singh"
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbNewLine
sTemp = sTemp & "To:"
sTemp = sTemp & vbNewLine
sTemp = sTemp & vbNewLine
oRange.Text = sTemp
sTemp = " " & vbCrLf
oWord.ActiveDocument.SaveAs "C:lettersample.doc"
End Sub
TextBox.text Content Retreival Of A Portion Of Text
Hi all,
I am stuck at a place where i have a text of 9 char length.
I need to retrieve the middle 3 characters....
eg:-
123456789
i can retrieve the first 3 characters(123) using the
Code:left("123456789",3)command
and retrieve the last 3 using the
Code:right("123456789",3)command
but how do i get the middle 3 characters(i.e. 456) extracted??
here is what i tried.
Code:str1 = txtBackground.Text
'store contents into a variant variable
str1 = Replace(str1, Left(str1, 3), "")
'replace the first 3 chars with ""
str1 = Replace(str1, Right(str1, 3), "")
'replace the last 3 chars with ""
finalstr = str1
'the final string in above example(456)
but, result of above operation is ""
any help shall be appreciated...
Please help me fast.
Thanks in Advance.
P.S.: I DONT WANT TO USE THE MID FUNCTION
------------------------------------------------------------------------------------------------
www.Tech-Arena.com/forums
The Indian Perspective Of Technology.
Edited by - Crazycoder on 9/19/2004 3:14:39 AM
Changing Text Orientation/Direction In Table Cell - VBA Word Automation
Hi,
I need to change the text direction/orientation to 90 degrees in a table cell in a Word document using automation. I know how to achieve this manually.
Right click on a table cell, select Text direction, in the window: select the orientation you want.
The same result I need to achieve through VBA automation. I am using Word 2003 & VB 6.
Could you please help me out in this regard ?
Thanks in advance.
Sisheer
Text Line Portion Reading :(
Hi everyone
Hi all , im having problems reading certain portions of text into command buttons in my quiz
Okay so basically my quiz operates my reading questions and answers from a text file
my text file basically looks like this , ive used comma's as seperators
Questions.txt
What is the Capital of Australia?,Sydney,Brisbane,Dubbo, Perth
What soccer team won the Premiership this year?Arsenal,Manchester United,Liverpool,Tottenham
Anyway , my quiz can read the Questions into my questions textbox randomly without any problems
It also reads Sydney,Brisbane,Dubbo and Perth , (into the questions textbox at the moment :P)
This is what i want to do , i want those 4 answers to be read into the 4 command buttons that are in my Quiz, how do i do this? and then the next question the 4 answers (Arsenal,Manchester Untied blah) will be read into the next 4 command buttons when the question is read
Know what i mean?
How do i do this? i want to keep the questiosn and answers on lines like this , And also how do i randomly generate the order of these Words in the command buttons , keeping in mind that i would probably set the first one from from the question so in this case Sydney as the correct answer
How To Make Row1 All Bold?
Hi all,
I found this code and I tested on my vb design environment successfully. I want to be able to make column A bold, row1 bold, and adjust the column A's width to 10.00. Can someone show me how or point to some online tutorials.
Thanks
Code:
Private Sub Form_Load()
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim xlWS As Excel.Worksheet
Set xlApp = New Excel.Application
Workbooks.Open FileName:=App.Path & " est.xls"
strCell = "A1" 'Location of File Path
Debug.Print xlApp.Range(strCell)
Debug.Print xlApp.Cells(2, 1)
xlApp.ActiveWorkbook.Close
xlApp.Quit
Set xlApp = Nothing
End Sub
How To Make A String Bold?
Hello everybody,
I have a variable test as string, what I want to do is display this in bold. How can I do this? Is this possible?
lexthor
How To Make Row1 Bold?
Hi all,
I found this code and I tested on my vb design environment successfully. I want to be able to make column A bold, row1 bold, and adjust the column A's width to 10.00. Can someone show me how or point to some online tutorials.
Thanks
Code:
Private Sub Form_Load()
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim xlWS As Excel.Worksheet
Set xlApp = New Excel.Application
Workbooks.Open FileName:=App.Path & " est.xls"
strCell = "A1" 'Location of File Path
Debug.Print xlApp.Range(strCell)
Debug.Print xlApp.Cells(2, 1)
xlApp.ActiveWorkbook.Close
xlApp.Quit
Set xlApp = Nothing
End Sub
How To Make A String Bold
can we make a string bold in vb
if yes please send me the code
one more problem i am using data reports in which i need that records follow column by column approach
i.e two columns are defined on a single page
records are first filled in first column then in second column
after that if records are filled on next page
Setting The Text Portion Of Combo Boxes
I have a combo box with a number of items which can vary from one the user to the next running the software. I need to default the text portion with one of the values in the list but cannot do this merely by setting combo.text to the value as it's a read only property.
I have the following but cannot get it to work
Public Declare Function SendMessageAny Lib "user32" Alias "SendMessageA" ( _
ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long
Public Const CB_SELECTSTRING = &H14D
FindString = oCurrentArea.GetTitle & Chr$(0)
hIndex = SendMessageAny(cboPrefixAreas.hWnd, CB_SELECTSTRING, -1, FindString)
where findstring equates to a simple text string, and is one of the values in the list.
Any ideas or has anyone tried this before ?
cheers
Combobox's Text Portion Window Handle
Hello,
I'm trying to disable the popup menu of textboxes and comboboxes. I used the tip in this site (www.vb-world.net/tips/tip131.html), but it works only for textboxes! I guess it's because the text portion of a combobox has a different window handle than the combobox itself.
How can I get the window handle of a combobox's text portion?
Thanks.
Make Font Bold In Flexgrid
I think this is an easy one but I can't find the anwer. Suppose I put text into a flexgrid, how can I make it bold at the same time, or chnage the property of the cell or whole row prior to inserting the text
grdPayroll.TextMatrix(GridRow, 4) = "Total Sub Hrs"
Thanks for the help
|