![]() |
Excel 2007: 2 Problems with textboxes
Hi,
I've just noticed that the textboxes are not resized when autosize is set to true: With Worksheets(1) .Shapes.AddTextbox(msoTextOrientationHorizontal, 12, 12, 12, 12).Select With Selection .AutoSize = True .Characters.Text = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" .Font.Name = "Arial" .Font.Size = 8 End With End With This works with all previous excel versions. With Excel 2007, you'll get a vertical textbox with a columns of Zs. May be they've changed the way to write, from to left to right to up to down .... just let me know. Another thing: it is (almost) impossible to catch a shape (textbox) for example to drag and drop it from one place to another, on a worksheet. If anyone has a trick I'd like to know it. Cheers, MrT |
Excel 2007: 2 Problems with textboxes
To complement my 2nd remark below, to select a textbox with some text just
written in it, you either need to have a good eye to click just on the right pixels on the border (the border used to be very thick in previous versions once a textbox was selected which made it easy), or you need to click on the textbox, then click on "Exit edit mode", then click on the border which, not being in dotted line anymore, is easier to select. MrT "MrT" wrote: Hi, I've just noticed that the textboxes are not resized when autosize is set to true: With Worksheets(1) .Shapes.AddTextbox(msoTextOrientationHorizontal, 12, 12, 12, 12).Select With Selection .AutoSize = True .Characters.Text = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" .Font.Name = "Arial" .Font.Size = 8 End With End With This works with all previous excel versions. With Excel 2007, you'll get a vertical textbox with a columns of Zs. May be they've changed the way to write, from to left to right to up to down ... just let me know. Another thing: it is (almost) impossible to catch a shape (textbox) for example to drag and drop it from one place to another, on a worksheet. If anyone has a trick I'd like to know it. Cheers, MrT |
Excel 2007: 2 Problems with textboxes
At first I thought this might be a problem with statement order. I've found
several things, mostly in charting, that used to be insensitive to the order of the commands but in 2007 the order is important. But even putting ..AutoSize = True at the end doesn't help. The width of the textbox is not changed by .AutoSize. But I noticed that the height of the textbox is scaled to fit the width and the amount of text. So Excel is doing something, just not the same thing it used to do, and not the thing we are expecting it to do. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "MrT" wrote in message ... Hi, I've just noticed that the textboxes are not resized when autosize is set to true: With Worksheets(1) .Shapes.AddTextbox(msoTextOrientationHorizontal, 12, 12, 12, 12).Select With Selection .AutoSize = True .Characters.Text = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" .Font.Name = "Arial" .Font.Size = 8 End With End With This works with all previous excel versions. With Excel 2007, you'll get a vertical textbox with a columns of Zs. May be they've changed the way to write, from to left to right to up to down ... just let me know. Another thing: it is (almost) impossible to catch a shape (textbox) for example to drag and drop it from one place to another, on a worksheet. If anyone has a trick I'd like to know it. Cheers, MrT |
All times are GMT +1. The time now is 06:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com