Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shouldnt this work?


If I have a sheet Formula =IF(A1 < "",ChangeSize())

and the ChangeSize() Sub in a VBA module is

Sub ChangeSize()
Msgbox(ActiveCell.value)
ActiveCell.Font.Size = 15
End Sub

It Puts up the Msgbox with the value of A1
But it doesnt change font size in the cell???


--
Willot
------------------------------------------------------------------------
Willot's Profile: http://www.excelforum.com/member.php...o&userid=35166
View this thread: http://www.excelforum.com/showthread...hreadid=549356

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Shouldnt this work?

Functions used in a worksheet and only return a value to the cell in which
they are used. They can not alter the excel environment. There are a few
exceptions, but nothing along the lines of what you want to do.

So no, it shouldn't work.

--
Regards,
Tom Ogilvy

"Willot" wrote:


If I have a sheet Formula =IF(A1 < "",ChangeSize())

and the ChangeSize() Sub in a VBA module is

Sub ChangeSize()
Msgbox(ActiveCell.value)
ActiveCell.Font.Size = 15
End Sub

It Puts up the Msgbox with the value of A1
But it doesnt change font size in the cell???


--
Willot
------------------------------------------------------------------------
Willot's Profile: http://www.excelforum.com/member.php...o&userid=35166
View this thread: http://www.excelforum.com/showthread...hreadid=549356


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
Macro to update a column in a work based on another work sheet WickerMan New Users to Excel 1 December 4th 09 12:58 PM
how can i automatically generate work order numbers from work orde rob h Excel Discussion (Misc queries) 1 July 13th 09 07:59 PM
Pivot table reorganizes when it shouldnt! MS Excel Worksheet Functions 3 October 9th 08 01:28 PM
excel shouldnt need a symbol before the first number in an equati stewart katz Excel Worksheet Functions 3 July 5th 05 05:52 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM


All times are GMT +1. The time now is 02:00 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"