+ Reply to Thread
Results 1 to 2 of 2

VBA Beginner

Hybrid View

tt388 VBA Beginner 06-07-2007, 08:53 AM
boylejob tt388, Try this and see if... 06-07-2007, 09:17 AM
  1. #1
    Registered User
    Join Date
    03-29-2007
    MS-Off Ver
    365
    Posts
    70

    VBA Beginner

    Anyone can help the reason my function does not work?

    Thanks.

     Function S(a, b)
    Dim a As Integer, b As Integer
    
    a = cell.Select(a1)
    b = cell.Select(a2)
    S = a + b
    
    End Function
    Last edited by VBA Noob; 06-07-2007 at 09:06 AM.

  2. #2
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    tt388,

    Try this and see if it works.

     Function S(a, b)
    Dim a As Integer, b As Integer
    
    a = activesheet.cells(1, 1).value
    b = activesheet.cell(1, 2).value
    S = a + b
    
    End Function
    Sincerely,
    Jeff

+ 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