Question as to why this will not run?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: melody (melody_at_discussions.microsoft.com)
Date: 03/23/05


Date: Wed, 23 Mar 2005 09:27:09 -0800


-- New to using VB to write macros….trying to get largest number in a column
and display that number within a message box….program will compile but I’m
getting a run time error.
Had programming experience in the past but it’s been quite some time!!!

Sub nextnum()
'
' nextnum Macro
' allows user to see next available number to assign to project
'
' Keyboard Shortcut: Ctrl+n
'
  Range("C250").Select
    ActiveCell.FormulaR1C1 = "=MAX(R[-106]C:R[-1]C)"
 MsgBox "Next available Non Residential number is " & [ActiveCell.FormulaR1C1]
 End Sub

mms



Relevant Pages

  • RE: Question as to why this will not run?
    ... "melody" wrote: ... > and display that number within a message box….program will compile but I’m ... > getting a run time error. ... > Sub nextnum() ...
    (microsoft.public.excel.programming)
  • RE: Compile of DBD Solid and run time error
    ... Compile of DBD Solid and run time error ... DBD-Solid-0.20a for my compile. ... set some of the SOLID environment variables mentioned in the DBD's README ... Some one else in the DBI user group may have other ideas. ...
    (perl.dbi.users)
  • Re: Question as to why this will not run?
    ... (remove nothere from the email address if mailing direct) ... "melody" wrote in message ... > getting a run time error. ... > Sub nextnum() ...
    (microsoft.public.excel.programming)
  • Re: Seeing value in textbox
    ... for display in a textbox. ... I got run time error '438' ... on code Selection.Characters.Text = Value1 ...
    (microsoft.public.excel.programming)
  • RE: Cant show non-modal form when modal form is displayed
    ... I have a modal userform that contains a button (among other controls). ... Clicking the button results in run time error 401: ... make the userform bigger and display the help text at the bottom. ...
    (microsoft.public.word.vba.general)