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: 293
Default Syntax Error '1004'

Greetings,

I am attempting to run this macro :

For this example x equals 1, 2 or 3. vName & vNum together is the
name of the originating TextBox.

Here is the code fragment in question:

Run "InvCol_" & x, vName, vNum

This will run one of the three procedures known as InvCol_1, InvCol_2
or InvCol_3 each with the pass though arguments of vName & vNum.

The problem is the VB error message:

Run-time error '1004'
The macro 'InvCol_1' cannot be found.

VB is calling it a macro, I'm not sure if that means anything or not.
The full name of the procedure is:

Public Sub InvCol_1(vName As Variant, vNum As Variant)

It is in the UserForm code area as is the rest of this code, It was
working until I changed the calling method to include a variable to
simplify the code.

Can anyone see what I did wrong to mess up this code and, more
importantly, how do I fix it?

Any help will be appreciated.

-minitman
 
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
run time error 1004 general odbc error excel 2003 vba Mentos Excel Programming 5 January 24th 11 02:56 PM
Error 1004 opening workbook 1004 WembleyBear Excel Programming 2 November 30th 09 01:33 PM
Error when cell A1 is not active and xlInsideVertical border formatthrowing error 1004 [email protected] Excel Programming 7 August 7th 08 08:43 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 04:05 AM.

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"