please help me find examples of working with the font of the text in the Excel cell in the TCL code. Turn on Border Bottom and use underline the text. Screenshot of the parameters I need to change below.
I found examples enter link description here but not exactly for underline the text
Thanks a lot
Related
I'm trying to figure out the particular border style of cell within a workbook that I received. The normal way to do this would be ctrl+1->Border and look at the style. However, the style for this particular cell is blanked out and I suspect that the border is formatted using a proprietary style. How do I get the properties of this border style (I guess with VBA?) in order to set up my own macro which then applies this particular border style to other cells?
I hope someone can help me out here.
EDIT:
In Excel, select the cell with the border in question.
Change to the VBE environment (Alt+F11). Open the Immediate Window (Ctrl+G).
Type in the immediate window:
? ActiveCell.Borders(xlEdgeBottom).LineStyle
And
? ActiveCell.Borders(xlEdgeBottom).Weight
Compare the values with the documentation:
https://learn.microsoft.com/en-us/office/vba/api/excel.xllinestyle
https://learn.microsoft.com/en-us/office/vba/api/excel.xlborderweight
It would surprise me it one of the two values cannot be found in the lists.
I believe you need to add bold white borders to the left and right-hand sides of the cell to generate the effect.
I am looking to make my excel spreadsheet insert a hyperlink to a PDF but only display the last five characters of the name eg: helpme12345 and the cell show 12345 as the clickable link. I can do this long winded but am hoping a VBA macro can do this quicker
How can I write this? Thanks in advance
I don't think you can solve it at all like that. Not even by using VBA. Either the entire cell is a hyperlink, or it's not.
But I'll provide you with a neat trick:
Enter your text in a cell and make it as big as you need. For example "Click here to read more". Edit the cell again (press F2) and underline the word "here". Add some font colour as well if you want
Now draw a rectangular box that covers the word "here" (Insert --> Shapes --> some rectangular box)
Right-click on the rectangle and define your hyperlinke
Finally: Make the box transparent without borders. It'll still be there, but it's invisible... BUT clickable! It looks like you click on the word, but it's the box you click on.
When setting a component color in Excel VBA using the syntax .BackColor, what should I enter to get desired color?
CommandButton.BackColor = 'What should I have here?
Here is a list of official names for colors: https://msdn.microsoft.com/en-us/library/6ys84h69%28v=vs.90%29.aspx.
When building a userform in excel, in the properties windows, open the drop down window for BackColor. Each color will have a name. "vb" follow by the name of the color you want without spaces will work as valid syntax (have not tested all of the color, could be wrong).
Just type SystemColorConstants. (including the dot) and you will get the whole list of constants. (Thanks Tom, from reply to question.)
CommandButton.BackColor = vbButtonFace 'This is default color for command button.
ISSUE: 1
I see a very strange behavior of Apache POI, I wrote an excel file using POI 3.9. While writing the cell I added a font style of Arial 8 and normal and the cells are merged.
While viewing the report all the cell styles are fine but I see that the text are bold. When I checked the cell property it looks fine. If in the ms excel I unmerge and again merge the cells the bold goes away but when written from POI it shows as bold.
One thing I found today is it looks bold only when in 100% zoom, even if I make it 99% the bold goes away.
Could anyone please explain this behavior and let me know what I have to do to fix this.
ISSUE 2:
I am adding the copyright symbol to the footer, but for some reason I see a question mark in the footer. Any idea what should I add to get the copyright symbol?
I can't for the life of me figure out why certain cells are shaded in a spreadsheet template I downloaded. I confirmed that the cell's shading property is set to no color. The cell has a simple formula: =SUM(J8:K8).
If the background color is being set by code in another cell, I'm not sure how to find it. Searching for the cell name (ex: B7) doesn't come up with anything. Any suggestions what could be setting the background color?
Have you had a look at the Conditional Formating options?
It could be that there's a background colour set in there.
In Office 2007 it's on the Ribbon in the Styles section on the Home tab - your best bet is to go for the "Manage Rules..." option, and then check the rules for each worksheet.