LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Placement of variables in called sub causes code to fail

Can somebody help me understand why the following code, in sub1 fails
to run but the modifcations to the called sub below that does run? I
was getting "Argument not optional" error.

Alan

Sub1() 'in module1
.....other routines
If bla bla then
Exporttofile 'in module2
Else
.... other routines

Sub Exporttofile (fName As String, Sep As String, SelectionOnly As
Boolean)
code...

Modified Exporttofile:

Sub Exporttofile()
Dim fName As String
Dim Sep As String
Dim SelectionOnly As Boolean

 
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
order placement of code Curt Excel Programming 0 March 19th 07 05:34 AM
Placement of code Hank Youngerman Excel Programming 3 November 17th 06 05:06 PM
Carrying Variables into Called Macros Marty Excel Programming 2 June 12th 04 01:23 AM
Placement of Code Phil Hageman[_3_] Excel Programming 7 January 30th 04 02:06 PM
Input variables on Sheet1 being called by a VB program on Sheet 2 RU42 Excel Programming 1 August 23rd 03 09:50 AM


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