Resize The Comment Box To The Size Of The Text I Put In?
Apr 2, 2009
when i use a macro to add a comment to one of my cells, if i put in too much text the box doesn't resize itself and you can only read part of the comment. how to resize the comment box to the size of the text i put in?
I use comments to supply various detail information on the value in the cell. This might take 10-12 lines of comments, but only the first five appear when you hover over the cell. In order to see the entire comment you have to right click and edit then manually resize.
Any tips on how to resize at the time the comment is loaded so no manual intervention is required?
open the attachment & click the button. I'd like you to please help me in reducing both the height & width of the picture. So that when the button is clicked the pic. overall size will appear smaller.
I have a form in vba with two tabs. Both the tabs are different sizes.
The first tab is quite large and the 2nd tab is smaller.
When I click the 2nd tab it shrinks the form but then when I click back to the first form it makes it the same size and the 2nd tab and cutting out key info.
Is there anyway I can resize the 1st tab again to go back to its original size?
I am a novice user and not very familiar with Macros or VBA. I took a macro I found on contextures and got it to resize comments that already exist. However, I am trying to get it to also create the comment (with no content) if the comment does not already exist, and then resize it. This is what I have so far:
Code: Sub ResizeCommentsInSelection() Dim mycell As Range Dim myRng As Range Dim lArea As Long Set myRng = Selection
I am using the following macro to creat comments based on the contents of certain cells. Everything works except the it resizes the Comment Boxes exponentially. The Last comment box in the range seems to be the default size, the next to last a little bigger, then it start getting even larger and larger until the first comment in the colomn.
Sub InsertComm() Dim RgPartnumb As Range Dim NRg As Range Set RgPartnumb = Range(Range("B2"), Range("B2").End(xlDown)) On Error Resume Next For Each NRg In RgPartnumb With NRg .Comment.Delete...................................
The comment boxes keep changing shape and location in my spreadsheet. Some are completely smashed together, while others are extraodinarily wide. I had them all to the right of the cell they applied to; but now they are all over the place.
I have a (semi-inherited) macro that prints different pages of a workbook, based on whether and what their entries are. One of the pages contains a text box, where users will enter different lengths of text. When the macro runs, it prints right the first time but also "resizes" the text box so that future print attempts only print part of it.
I put "resize" in quotes because the text box does not appear to change shape. However, when I look at its properties it suddenly says it is much smaller than it was before (and still appears to be).
I have a (semi-inherited) macro that prints different pages of a workbook, based on whether and what their entries are. One of the pages contains a text box, where users will enter different lengths of text. When the macro runs, it prints right the first time but also "resizes" the text box so that future print attempts only print part of it.
I put "resize" in quotes because the text box does not appear to change shape. However, when I look at its properties it suddenly says it is much smaller than it was before (and still appears to be).
FWIW, I'm using Excel 2003.
Here's the code in question (the problem is on the "narrative" page):
Sub CLCMprintall() ' prints all pages (with data) on the CLCM spreadsheet Dim x, a, b, c, d, e, f, g, h, i As String Dim y, z, q As Integer
ActiveSheet.Unprotect Password:="***"
'notes active cells on each sheet to return cursor there afterwards. x = ActiveSheet.Name Sheets("page 1").Select a = ActiveCell.Address(True, True) Sheets("narrative").Select d = ActiveCell.Address(True, True) '(repeat for other worksheets - also sets values for Loan2Amt, Q & Z, 'which govern whether other unrelated sheets need to be printed.) ' 'tests whether there is text in Overflow sheet and sets print area if there is If q 0 Then Call OverflowPrintArea.............
I have a spread sheet were the area is getting very limited. I need to insert a small icon and when the mouse goes over (like it does in a form tool tip) will show the value of a cell (text value) located in another sheet in same workbook, or I was thinking inset a comment next to the icon and link the comments of the comments text to cell with the text value.
I have a spread sheet were the area is getting very limited. I need to insert a small icon and when the mouse goes over (like it does in a form tool tip) will show the value of a cell (text value) located in another sheet in same workbook, or I was thinking inset a comment next to the icon and link the comments of the comments text to cell with the text value.
I've look the properties of this to objects and can figure it out.
how to copy the contents of multiple comment boxes and paste in a single comment box.
The big picture is that I have a number of cells with numerical values in and text in comment boxes. I want to be able to click a button to copy the contents of the comment boxes and paste them, along with the numerical value from the cell, into a single comment box, ordered by highest to lowest value within the comment box, then delete the original cells and comments.
I am quite new to VBA but have been coping quite well so far with information of the web and analysing recorded macros.
Is there a way to change the font size and style of a comment of a certain cell? I mean is it possible to have the sizes of comments varies in one worksheet?
if choose a cell then the code works fine, but when i choose a selection of cells (ex. A1 A2A3 A4) then the code fail to excute in this line: Invalid proceduer call or argument error
.AddComment "hmk :" & Chr(10) & " value was " & ActiveCell.Value
and then fail to excute in this line: typr mismatch error
Selection.Value = (Selection.Value) * r
now here, does have to be loop to solve
here is the full code
Sub test() Dim r As Integer ActiveCell.ClearComments
I am trying to combine the text from the comments boxes of a full row of cells into the comments box of a separate other cell in order to provide an overview of the comments in these cells in one place.
Cell B4 is selected by user and then runs the macro. The macro then looks UP (A3, A2, A1 etc) cell by cell until it finds the first cell that has a valid date in it and if that date is same as the date that the macro is being run pastes "This Text" into the comments section (Not replacing everything in the comments but simply adding to it.)
Column A
2/20/2009 (empty cell) Dave Jonathan Steve
2/21/2009 James Sally Tyler (empty cell) John Betty
I need a nudge in the right direction with how to amend the below code so that it : 1: cycles though all cells in a workbook, and sees whether the text reference of the cell contains a picture filename (i.e. searches for .png or .jpg in the cell contents) 3: if (1) is correct, it retrieves the picture from "C:/Users/jeff/Documents/Standards/" and pastes it as a cell comment background in the cell to the right (and overwrites any comment backgrounds that might already exist there)
The code below does something a bit different: it looks in a defined range, then adds a comment with a background picture retrieved based on the text in the cell to the left.
I'm sure this is a pretty basic change, but my VBA skills aren't up to it...I've only just started reading though Walkenbach's Power Programming! I'm using Excel 2007
Sub InsertComment() 'www.contextures.comxlcomments03.html Dim rngList As Range Dim c As Range Dim cmt As Comment Dim strPic As String
On Error Resume Next
Set rngList = Range("A1:A5") strPic = "C:/Users/jeff/Documents/Standards/" On Error Resume Next For Each c In rngList With c.Offset(0, 1)...................
Is it possible to insert text as a comment on another sheet based on a date?
I have Sheet 1, that has 3 columns, Name, Date, Reason
Sheet 2 is a monthly calendar with the dates in E5:AH5 and the names from D6:D10.
What I am trying to do, is when they enter their name, date and reason on sheet 1, I want the reason to to be inserted on sheet 2 as a comment in the cell that matches the date and the name.
I have a number of comment (all column D) that have lots of data in each one.
The data will appear like this (each new entry (new entry denoted by a date))
01-May 12:58:05 Liam 02-May 16:18:27 Josh 07-May 11:51:26 Bob 02-May 01:13:34 Terry
What i want to know is, can i change the colour of the text in the comment, if its todays date. So in this case 07-May 11:51:26 Bob goes red (its the 7th here for me).
Need to correct code to resize all visible rows on a sheet based only on the text in the visible columns. I have tried the below code but when it resizes it is using the largest amount of text in the rows including that in the hidden columns.
i have the following code to insert comments into cells, however if the user cancels the input box (i.e. doesn't insert any text), a comment is still added with their details and the comment 'FALSE'. Is there anyway to stop comments being added if the user cancels the input?
Sub Insert_Comment() Dim iReply As Integer
Dim cl As Range Dim sComment As String Dim sText As String Dim UserNameWindows As String
I have a sheet with four listboxes on it. All four have their source on the "Lookup" tab - Lookup is very hidden and is zoomed at 100%. Every once in a blue moon, the text in the four listboxes will shrink to be very tiny. The listboxes themselves will stay the same size, but the text inside shrinks.
Starts off looking like this:[url] Somehow ends up looking like this: [url]
I compared the two pictured files and the properties of the listboxes were totally identical for both.
Each time this has happened, it's always been on someone else's computer (fifty people each use a copy of this file), so I don't have many clues as what is going on when this happens... Does anyone have any idea how to prevent this from happening, or how to restore a file like this instead of replacing it?