![]() |
Using VBA Functions in a worksheet
Within VBA I can access worksheet functions, like ROMAN, as follows:
TryString = Application.WorksheetFunction.Roman(i) In the worksheet I can access worksheet functions and any UDFs I define. How can I access VBA functions, like DIR(), in the worksheet? -- Gary''s Student |
Using VBA Functions in a worksheet
Maybe with a worksheet_event macro. Right click the sheet tabview codeleft
window worksheetright window for different events -- Don Guillett SalesAid Software "Gary''s Student" wrote in message ... Within VBA I can access worksheet functions, like ROMAN, as follows: TryString = Application.WorksheetFunction.Roman(i) In the worksheet I can access worksheet functions and any UDFs I define. How can I access VBA functions, like DIR(), in the worksheet? -- Gary''s Student |
Using VBA Functions in a worksheet
This is similar to what I am attempting to avoid. For example IsDate() is
available in VBA, but is not a worksheet function. To use IsDate() in the worksheet, I create a UDF as follows: Function isdt(s As Range) As Boolean isdt = IsDate(s) End Function I can then use isdt (a.k.a IsDate) anywhere in the worksheet. Do I have to create a UDF for every VBA function I want to use in the worksheet?? -- Gary''s Student "Don Guillett" wrote: Maybe with a worksheet_event macro. Right click the sheet tabview codeleft window worksheetright window for different events -- Don Guillett SalesAid Software "Gary''s Student" wrote in message ... Within VBA I can access worksheet functions, like ROMAN, as follows: TryString = Application.WorksheetFunction.Roman(i) In the worksheet I can access worksheet functions and any UDFs I define. How can I access VBA functions, like DIR(), in the worksheet? -- Gary''s Student |
Using VBA Functions in a worksheet
Thank you
-- Gary''s Student "Don Guillett" wrote: A udf works like any other function in that it can only return values. With that in mind, I guess so. -- Don Guillett SalesAid Software "Gary''s Student" wrote in message ... This is similar to what I am attempting to avoid. For example IsDate() is available in VBA, but is not a worksheet function. To use IsDate() in the worksheet, I create a UDF as follows: Function isdt(s As Range) As Boolean isdt = IsDate(s) End Function I can then use isdt (a.k.a IsDate) anywhere in the worksheet. Do I have to create a UDF for every VBA function I want to use in the worksheet?? -- Gary''s Student "Don Guillett" wrote: Maybe with a worksheet_event macro. Right click the sheet tabview codeleft window worksheetright window for different events -- Don Guillett SalesAid Software "Gary''s Student" wrote in message ... Within VBA I can access worksheet functions, like ROMAN, as follows: TryString = Application.WorksheetFunction.Roman(i) In the worksheet I can access worksheet functions and any UDFs I define. How can I access VBA functions, like DIR(), in the worksheet? -- Gary''s Student |
All times are GMT +1. The time now is 04:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com