ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing Font Name in Function Sub (https://www.excelbanter.com/excel-programming/388372-changing-font-name-function-sub.html)

zhj23

Changing Font Name in Function Sub
 
I wrote a Function Sub with alphbet letters as output, but wish to change
this output to greek symbols. These are my codes:

with activecell
.font.name="symbol"
end with

It doesnt work. Can anyone correct it for me? Many thanks.

leung

Changing Font Name in Function Sub
 
The coding is OK to run on my PC.

Are you sure the user get the correct Symbol font?

Can it be manually changed? if yes, it should be OK.



"zhj23" wrote:

I wrote a Function Sub with alphbet letters as output, but wish to change
this output to greek symbols. These are my codes:

with activecell
.font.name="symbol"
end with

It doesnt work. Can anyone correct it for me? Many thanks.


zhj23

Changing Font Name in Function Sub
 
Yes. It can be manually changed from the Font menu. But can't have the result
when embedded in the Function Sub.


"Leung" wrote:

The coding is OK to run on my PC.

Are you sure the user get the correct Symbol font?

Can it be manually changed? if yes, it should be OK.



"zhj23" wrote:

I wrote a Function Sub with alphbet letters as output, but wish to change
this output to greek symbols. These are my codes:

with activecell
.font.name="symbol"
end with

It doesnt work. Can anyone correct it for me? Many thanks.


NickHK

Changing Font Name in Function Sub
 
If you are trying to write a worksheet function to achieve this, it will
fail.
You can only return a value to a cell, not change the Excel environment.

NickHK

"zhj23" wrote in message
...
Yes. It can be manually changed from the Font menu. But can't have the

result
when embedded in the Function Sub.


"Leung" wrote:

The coding is OK to run on my PC.

Are you sure the user get the correct Symbol font?

Can it be manually changed? if yes, it should be OK.



"zhj23" wrote:

I wrote a Function Sub with alphbet letters as output, but wish to

change
this output to greek symbols. These are my codes:

with activecell
.font.name="symbol"
end with

It doesnt work. Can anyone correct it for me? Many thanks.




zhj23

Changing Font Name in Function Sub
 
Thanks. I guess that must be the reason why I fail. Looks like I have to give
up that idea and change the font manually.

zhj23

"NickHK" wrote:

If you are trying to write a worksheet function to achieve this, it will
fail.
You can only return a value to a cell, not change the Excel environment.

NickHK

"zhj23" wrote in message
...
Yes. It can be manually changed from the Font menu. But can't have the

result
when embedded in the Function Sub.


"Leung" wrote:

The coding is OK to run on my PC.

Are you sure the user get the correct Symbol font?

Can it be manually changed? if yes, it should be OK.



"zhj23" wrote:

I wrote a Function Sub with alphbet letters as output, but wish to

change
this output to greek symbols. These are my codes:

with activecell
.font.name="symbol"
end with

It doesnt work. Can anyone correct it for me? Many thanks.





leung

Changing Font Name in Function Sub
 
Hi

I believe it works if you set it as macro or a Sub in VBA.

But worksheet function is not the correct way to do that.



"zhj23" wrote:

Thanks. I guess that must be the reason why I fail. Looks like I have to give
up that idea and change the font manually.

zhj23

"NickHK" wrote:

If you are trying to write a worksheet function to achieve this, it will
fail.
You can only return a value to a cell, not change the Excel environment.

NickHK

"zhj23" wrote in message
...
Yes. It can be manually changed from the Font menu. But can't have the

result
when embedded in the Function Sub.


"Leung" wrote:

The coding is OK to run on my PC.

Are you sure the user get the correct Symbol font?

Can it be manually changed? if yes, it should be OK.



"zhj23" wrote:

I wrote a Function Sub with alphbet letters as output, but wish to

change
this output to greek symbols. These are my codes:

with activecell
.font.name="symbol"
end with

It doesnt work. Can anyone correct it for me? Many thanks.





zhj23

Changing Font Name in Function Sub
 
OK. Thanks. I will try.

zhj23

"Leung" wrote:

Hi

I believe it works if you set it as macro or a Sub in VBA.

But worksheet function is not the correct way to do that.



"zhj23" wrote:

Thanks. I guess that must be the reason why I fail. Looks like I have to give
up that idea and change the font manually.

zhj23

"NickHK" wrote:

If you are trying to write a worksheet function to achieve this, it will
fail.
You can only return a value to a cell, not change the Excel environment.

NickHK

"zhj23" wrote in message
...
Yes. It can be manually changed from the Font menu. But can't have the
result
when embedded in the Function Sub.


"Leung" wrote:

The coding is OK to run on my PC.

Are you sure the user get the correct Symbol font?

Can it be manually changed? if yes, it should be OK.



"zhj23" wrote:

I wrote a Function Sub with alphbet letters as output, but wish to
change
this output to greek symbols. These are my codes:

with activecell
.font.name="symbol"
end with

It doesnt work. Can anyone correct it for me? Many thanks.





All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com