Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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 & " & "":"" "

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default 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 & "

& "":"" "

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error setting shape text property Sarge Charts and Charting in Excel 2 January 11th 06 03:31 AM
Textbox ControlSource Property - Excel 97 Tom Ogilvy Excel Programming 0 June 17th 04 09:45 PM
Setting the Values Property of the Series Class Alex A Excel Programming 2 January 30th 04 08:55 PM
Setting TopMargin Property in VBA John S.[_3_] Excel Programming 2 October 17th 03 06:08 PM
setting formula property Ed Stevens Excel Programming 1 September 9th 03 04:59 AM


All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"