Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vba excel - public function in module

i created a public function in a module. when i call it in excel, it
works fine. but as soon as i open any other workbook (even a new one),
it returns a value error. i have to go back into that cell and hit
enter for it to work again.

thoughts?

thanks,
sg
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default vba excel - public function in module


In order to use function globaly to other workbook, you had to make
Addin......

Follow this :
- Create new Excel file
- Write your code(function)
- Save file as Excel Add-in (.xla file).
.....now, Go to Tools -- Addins... and load the saved file.

now this The function will now be globally available to all.

will not work if moved to a different machine, as it a different case.......:)

Gaurav Kothari


" wrote:

i created a public function in a module. when i call it in excel, it
works fine. but as soon as i open any other workbook (even a new one),
it returns a value error. i have to go back into that cell and hit
enter for it to work again.

thoughts?

thanks,
sg

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
Declaring variables in Module vs. Public Jeff Excel Discussion (Misc queries) 5 November 19th 07 08:27 PM
Moving Public Function From Workbook Module to XLA Bruce[_10_] Excel Programming 3 October 25th 07 08:30 PM
compiler error: public object module Wang Excel Programming 2 September 24th 06 08:31 PM
How to add a public subroutine to a class module keithb Excel Programming 2 December 19th 05 08:36 PM
Passing Public Module Vairable to a Worksheet Event SMS - John Howard Excel Programming 1 November 4th 04 08:33 AM


All times are GMT +1. The time now is 06:22 PM.

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

About Us

"It's about Microsoft Excel"