LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sub or function not defined.


I am trying to make a checkbox copy a cell to a different location, and
in the cells original location put the result of the moved cell + a
waste percentage, in this case being 10% "1.1"
The code looked okay to be except everytime i check to box to start the
process it says sub or function not defined... please help me out if i'm
doing something stupid.

Thanks!
Code below!


Code:
--------------------
Private Sub CheckBox1_Click()
If Cell(Z20 = "1") Then
Range("G20").Select
Selection.Copy
Range("AA20").Select
ActiveSheet.Paste
Range("G20").Select
ActiveCell.FormulaR1C1 = "=RC[20]*1.1"
Range("G20").Select
ElseIf Cell(Z20 = "2") Then
Range("C20").Select
Selection.Copy
Range("AA20").Select
ActiveSheet.Paste
Range("C20").Select
ActiveCell.FormulaR1C1 = "=RC[20]*1.1"
Range("C20").Select
End If
End Sub
--------------------


--
foxgguy2005
------------------------------------------------------------------------
foxgguy2005's Profile: http://www.excelforum.com/member.php...o&userid=23663
View this thread: http://www.excelforum.com/showthread...hreadid=376988

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using a defined Name in a function cole Excel Worksheet Functions 2 July 31st 09 04:36 PM
Sub or function not defined wmdmurphy Excel Worksheet Functions 13 May 24th 09 05:50 PM
sumproduct function / VB user defined function aw Excel Discussion (Misc queries) 3 September 23rd 08 09:05 AM
Sub or Function not defined Patrick Simonds Excel Programming 3 May 22nd 04 07:17 PM
User-Defined Function pre-empting Built-in Function? How to undo???? MarWun Excel Programming 1 August 6th 03 09:31 PM


All times are GMT +1. The time now is 09:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"