+ Reply to Thread
Results 1 to 5 of 5

UDF SpellIndian conflict

  1. #1
    Registered User
    Join Date
    05-05-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    6

    UDF SpellIndian conflict

    Hi,


    The code mentioned below is working perfectly as it should.

    Please Login or Register  to view this content.
    But after creating module with below mentioned code the above code to hide rows does not work & when I remove the below mentioned code from the module everything works fine.

    Please Login or Register  to view this content.
    Any help ?

  2. #2
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: UDF SpellIndian conflict

    I can't say for certain why you are having your problem, but I will note that both sets of code should not be in the same module.

    The code for: Private Sub Worksheet_Change(ByVal Target As Range) belongs in a worksheet module.

    Your other code belongs in a standard module.

    In the Visual Basic Editor (when viewing the VBAProject):
    A standard module is kept in a folder called Modules.
    A worksheet module is kept in a folder called Microsoft Excel Objects.

  3. #3
    Registered User
    Join Date
    05-05-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: UDF SpellIndian conflict

    I am struggling for the solution from the last one week. Private Sub Worksheet_Change(ByVal Target As Range) code is on First worksheet & UDF in module converts the numbers into words on Second sheet. The both sheets are on same Workbook. Is there any way like define the Private Sub Worksheet_Change(ByVal Target As Range code into a function & the call this function in Private Sub Worksheet_Change(ByVal Target As Range) in like below

    Please Login or Register  to view this content.
    and then call it like

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: UDF SpellIndian conflict

    How about:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-05-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: UDF SpellIndian conflict

    Thanks StevenM for your valuable suggestion. Your code given me lots of new ideas in defining functions. I am new to VBA. After step by step analyzing my code I got hit where the code is being conflicted. I my workbook cell J240 is set to Number & its value is being automatically updated based on some calculation. Now the problem is when I manually update J240 both my codes work fine, but when I enter formula =K266 in Cell J240, then code for hiding rows did not worked.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1