LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to call startup folder vba function?

"Tom Ogilvy" wrote
Application.Run "Startup.xls!Macro1"


Thanks a lot for the post. I did a search after your suggestion on working
with arguments.

My function in my vba code.xls is :

Public Function SHEETOFFSET(offset, Ref)
' Returns cell contents at Ref, in sheet offset
Application.Volatile
SHEETOFFSET = Sheets(Application.Caller.Parent.Index _
+ offset).Range(Ref.Address)
End Function

I have tried
=Application.Run("My vba code.xls!SHEETOFFSET",1,A1)+31
and the likes. I no longer am getting an error but it can't evaluate it and
I get a #name?

I am trying it in A1 in the sheet to the left of the previous sheet where A1
contains a valid date. Can you spot my error?

Cheers, Tom.


 
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
Personal Macro Workbook in startup folder missing Susan Rochon Excel Discussion (Misc queries) 3 September 17th 09 02:44 AM
Template Startup Folder On A Network Drive RS Excel Discussion (Misc queries) 1 December 4th 07 03:08 PM
Unable to load files from alternate startup folder Bill.Carlson Excel Discussion (Misc queries) 3 November 24th 05 03:36 PM
Personal.xls in the startup folder must stay open for recording Peter[_21_] Excel Programming 0 August 23rd 03 10:24 PM


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