Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Extreme newb, easy question: Simple button/scrollbar coding


I need to know how to take values from a cell in the worksheet and link
them to a scrollbar/spinbar, etc. But I get an error 424 every time I
try to use the buttons/bars. It's a class assignment, which is why I
seem so clueless: they threw me in to the fire with no knowledge of VB!


Here's the code

Private Sub btnReset_Click()
scrUnitsSold.Value = 25000
spnPrice.Value = 3000
spnMaterialCost.Value = 200
spnMfgCost.Value = 300
Range("A1").Select
End Sub



Private Sub strUnitsSold_Change()
Range("Units_Sold").Value = scrUnitsSold.Value
End Sub


I just have two objects so far: a reset button and a scrollbar. The
scrollbar simply links to a cell named "Units_Sold." The reset button
sets the other buttons to a default value, and selects A1.

But I keep getting Run-time error 424. HELP PLEASE!


--
BlackSeaBandit
------------------------------------------------------------------------
BlackSeaBandit's Profile: http://www.excelforum.com/member.php...o&userid=36965
View this thread: http://www.excelforum.com/showthread...hreadid=566876

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Extreme newb, easy question: Simple button/scrollbar coding

Check your typing: Is it "strUnitsSold" or "scrUnitsSold" ?

Private Sub strUnitsSold_Change()
Range("Units_Sold").Value = scrUnitsSold.Value
End Sub

NickHK

"BlackSeaBandit"
<BlackSeaBandit.2bu89z_1154396306.2536@excelforu m-nospam.com wrote in
message news:BlackSeaBandit.2bu89z_1154396306.2536@excelfo rum-nospam.com...

I need to know how to take values from a cell in the worksheet and link
them to a scrollbar/spinbar, etc. But I get an error 424 every time I
try to use the buttons/bars. It's a class assignment, which is why I
seem so clueless: they threw me in to the fire with no knowledge of VB!


Here's the code

Private Sub btnReset_Click()
scrUnitsSold.Value = 25000
spnPrice.Value = 3000
spnMaterialCost.Value = 200
spnMfgCost.Value = 300
Range("A1").Select
End Sub



Private Sub strUnitsSold_Change()
Range("Units_Sold").Value = scrUnitsSold.Value
End Sub


I just have two objects so far: a reset button and a scrollbar. The
scrollbar simply links to a cell named "Units_Sold." The reset button
sets the other buttons to a default value, and selects A1.

But I keep getting Run-time error 424. HELP PLEASE!


--
BlackSeaBandit
------------------------------------------------------------------------
BlackSeaBandit's Profile:

http://www.excelforum.com/member.php...o&userid=36965
View this thread: http://www.excelforum.com/showthread...hreadid=566876



Reply
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
Here is a simple formula request from a newb Darryl Excel Worksheet Functions 5 July 27th 06 08:51 PM
i know this has to be so easy -newb chris_ Excel Discussion (Misc queries) 6 July 11th 05 09:57 PM
Conditional Formating Extreme Question Heather Excel Worksheet Functions 5 May 8th 05 08:06 PM
Sharing macros - extreme newbie question I know. rfalke Excel Programming 1 October 13th 04 06:08 PM
simple scrollbar question scottnshelly[_42_] Excel Programming 8 June 22nd 04 04:31 PM


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

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

About Us

"It's about Microsoft Excel"