Re: Inserting a Value into a Range



Hi Andy,
Do you use Option Explicit with your code modules?
Is the code you have posted a copy/paste of the original code or have
you entered it via the keyboard?
You have "Dim CountyTax As Range" and "Set CoutyTax = ....."
Option Explicit would pick up this typo when you run the code.
I can't be certain, but that could be the problem.
Ken Johnson

.



Relevant Pages

  • Re: Global variables cleared by forms?
    ... Apologies...both the procedures calling forms are clearing the variables. ... are all of your code modules got he statement 'Option Explicit' at ... > otherwise we are using different variables (Option Explicit will trap this). ...
    (microsoft.public.excel.programming)
  • Re: VB6 code analyze tool
    ... >I don't believe it checks for undeclared variables but you could parse the ... >code modules for the Option Explicit statement. ... Although adding Option Explicit will soon reveal them;-) ... >> I wonder if there is any tool that can automatically analyse VB6 code. ...
    (microsoft.public.vb.general.discussion)
  • Re: Problem with Object Reference for MailItem
    ... If you used "Option Explicit" at the top of all your code modules, ... Or in the VBE, click Tools>Options>Editor tab, check "Require Variable ...
    (microsoft.public.outlook.program_vba)
  • Option Explicit statement
    ... Form some reason, the option explicit statement is no longer showing in my code modules. ...
    (comp.databases.ms-access)
  • Re: Calculate Last Digits
    ... adapt your original code that uses "Map" for this?. ... Option Explicit ... Option Base 1 ... Dim nValAs Double ...
    (microsoft.public.vb.general.discussion)