Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sub or Function not defined

Last week, i had a workbook that worked perfectly. I went on vacatio
and when i came back i get an error "Sub or Fuction not defined". th
only thing that it says is
Private Sub CommandButton3_Click()

Call changecolors

End Sub

what could possibly be wrong with this that was not wrong last week?

and yes, i do have a module with the name changecolor

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sub or Function not defined

A macro called "changecolors" cannot located.

You said a "module" called "changecolor" exists. But the macro looks for a "macro" (a subroutine) called "changecolor" to execute.

Regards,
Edwin Tam
http://www.vonixx.com


"scottnshelly " wrote:

Last week, i had a workbook that worked perfectly. I went on vacation
and when i came back i get an error "Sub or Fuction not defined". the
only thing that it says is
Private Sub CommandButton3_Click()

Call changecolors

End Sub

what could possibly be wrong with this that was not wrong last week?

and yes, i do have a module with the name changecolors


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sub or Function not defined

I meant i have a macro named changecolors in a module.
this is in module2:
Private Sub changecolors()
this is in sheet1:
Private Sub CommandButton3_Click()

Call changecolors

End Sub

this worked the other day.
thanks

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Sub or Function not defined

Scott,
Your "changecolors" routine is private, so sheet1 cannot see it. Change it
to Public.

NickHK

"scottnshelly " wrote in
message ...
I meant i have a macro named changecolors in a module.
this is in module2:
Private Sub changecolors()
this is in sheet1:
Private Sub CommandButton3_Click()

Call changecolors

End Sub

this worked the other day.
thanks.


---
Message posted from http://www.ExcelForum.com/



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
using a defined Name in a function cole Excel Worksheet Functions 2 July 31st 09 04:36 PM
sumproduct function / VB user defined function aw Excel Discussion (Misc queries) 3 September 23rd 08 09:05 AM
Max of a defined function Barb Reinhardt Excel Worksheet Functions 4 May 18th 06 05:58 PM
Sub or Function not defined Patrick Simonds Excel Programming 3 May 22nd 04 07:17 PM
User-Defined Function pre-empting Built-in Function? How to undo???? MarWun Excel Programming 1 August 6th 03 09:31 PM


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