![]() |
Setting the formula property of a textbox
After creating a textbox:
Worksheets(ActiveSheetName).Shapes.AddTextbox.Sele ct I try to set its formula (where sForm="Sheetname!B8"): this works: selection.Formula = sForm this does not: selection.Formula = "= " & sForm & " & "":"" " |
Setting the formula property of a textbox
AFAIK the only type of formula you can put into a Textbox
or Label is a reference to a single cell, such as you have successfully been able to do. (Manually - select Textbox, select input-bar, type an =, then the reference). As a workaround maybe you could put your desired formula in a cell (possibly hidden, or on another sheet) then reference this cell in your Textbox. If my "AFAIK" is wrong I'm sure someone will be good enough to correct! Regards, Peter -----Original Message----- After creating a textbox: Worksheets (ActiveSheetName).Shapes.AddTextbox.Select I try to set its formula (where sForm="Sheetname!B8"): this works: selection.Formula = sForm this does not: selection.Formula = "= " & sForm & " & "":"" " . |
All times are GMT +1. The time now is 02:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com