The reason for the error is that a function can not do a Select.
Functions basically can only return values. They can not change other
cells or go to other cells.
Robert Flanagan
Add-ins.com LLC
http://www.add-ins.com
Productivity add-ins and downloadable books on
VB macros for Excel
On Jun 4, 2:11*pm, BrkenRecord
wrote:
Hey guys, I've recently been assigned a project that uses VBA and I've
been slamming my head against the keyboard for a few hours on this one,
so any help would be more greatly appreciated than you can possibly
imagine. I can't find anything online, and the answer is probably really
simple. In any case:
Function HelpPlease()
Call GetTableValue(i)
MsgBox "value is" & i
End Function
Sub GetTableValue(i)
Sheets("TableC11").Select
Range("A6").Select
i = ActiveCell.Value
End Sub
Does not return the value stored in A6 and creates an annoying spurt of
message boxes telling me that the value is 0. I'm seriously about to
break my computer from sheer rage. Help please!
--
BrkenRecord