Results 1 to 6 of 6

Event button error & code syntax in VBA...

Threaded View

BGiffin2004 Event button error & code... 11-12-2011, 01:05 AM
pike Re: Event button error & code... 11-12-2011, 03:10 AM
protonLeah Re: Event button error & code... 11-12-2011, 03:15 AM
BGiffin2004 Re: Event button error & code... 11-12-2011, 05:13 PM
pike Re: Event button error & code... 11-12-2011, 05:31 PM
BGiffin2004 Re: Event button error & code... 11-12-2011, 05:54 PM
  1. #1
    Registered User
    Join Date
    11-10-2011
    Location
    Chatsworth, California
    MS-Off Ver
    Excel 2010
    Posts
    41

    Event button error & code syntax in VBA...

    (I am using Windows XP: 32 bit version / Excel 2010)
    This Function is supposed to calculate Fahrenheit from Celsius with the click of a "Calculate" button (CommandButton1). CommandButton2 is supposed to "Clear" the C & F fields – and the line is yellow highlighted for an error reason. ANY pointers would be appreciated. (See zipped picture and workbook attachments.) – Thanks!

    Public Function Converter ()
    C As Double, F As Double
    Private Sub CommandButton1_Click ()
    C13 = C ……………………………………………(C13 is the cell for the Celsius entry.)
    D13 = F ……………………………………………(D13 is the cell for the Fahrenheit entry.)
    F = 32 + (9 / 5) * C
    End Sub
    Private Sub CommandButton2_Click () …………(This line is yellow highlighted.)
    Clear F, C 
    End Sub
    End Function
    Attached Files Attached Files
    Last edited by BGiffin2004; 11-12-2011 at 05:55 PM. Reason: add code tags

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