ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How does a module of VB work in a Worksheet? (https://www.excelbanter.com/excel-worksheet-functions/229391-how-does-module-vbulletin-work-worksheet.html)

VJ Sharma[_2_]

How does a module of VB work in a Worksheet?
 
I have found a user defied function for converting the numeric value into
text, I have inserted the by using Alter+F11 in particular Worksheet. And
found that it was resulting wha I needed. But after some days I used the same
function in the sme worksheet. But did not work. I then again did the same
process but it dis no t work. But if I use it in the other worksheet by doing
the same process, it works perfectely. But I eed this function in my previus
worksheet only. Can someoe guide me where I'm making mistake.
Thanks
VJ Sharma

Trev B

How does a module of VB work in a Worksheet?
 
Hi VJ,

Make it a public function and add it to a module (Alt+F11, Insert, Module)

A public function is availabe to every sheet in the workbook.

You could also add a macro button to your worksheet that runs your code on
click.

Regards

Trev B


"VJ Sharma" wrote:

I have found a user defied function for converting the numeric value into
text, I have inserted the by using Alter+F11 in particular Worksheet. And
found that it was resulting wha I needed. But after some days I used the same
function in the sme worksheet. But did not work. I then again did the same
process but it dis no t work. But if I use it in the other worksheet by doing
the same process, it works perfectely. But I eed this function in my previus
worksheet only. Can someoe guide me where I'm making mistake.
Thanks
VJ Sharma



All times are GMT +1. The time now is 12:44 PM.

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