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: 33
Default Importing Checkbox Values

Hello:

I have 20 checkboxes on a worksheet (called
PriorVersion.xls"), some of which may be checked, some
may not. I want to duplicate the checked checkboxes onto
another sheet (containing 20 identical checkboxes) using
code. Both sheets are called "Instructions", and are in
two separate workbooks.

I want to set up a For-Next loop to examine each checkbox
(1-20) in the original worksheet and make the counterpart
of each in the new workbook the same "Value" (True or
False, e.g. automatically check boxes 5, 8, 12 and 15 in
the new workbook if the same boxes are checked in the old
workbook).

The code below doesn't work because the syntax is wrong
(it doesn't like statement inside my For loop - "object
doesn't support this property or method").

Dim OLDINST, NEWINST as Object
Set OLDINST = Workbooks("PriorVersion.xls").Sheets
("Instructions")
Set NEWINST = Workbooks(ActiveWorkbook.Name).Sheets
("Instructions")
For BOX = 1 To 20
NEWINST.CheckboxBOX.Value = OLDINST.CheckboxBOX.Value
Next BOX

I could do it with 20 If-Then statements, but there has
to be a way to use the checkbox number as a variable.

One condition: the checkboxes in the new workbook call
macros when they are clicked. I DO NOT want this code to
execute when the values of the checkboxes are imported
from the previous workbook. I'm thinking this will be
the case (i.e., the code will not execute unless the
boxes are clicked, but I can change the values without
clicking the boxes).

Any ideas? Help is appreciated.
Thanks, MARTY
 
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
importing multiple values from a spreadsheet Perplexed Peter Excel Worksheet Functions 2 May 29th 08 12:05 AM
Checkbox values? T135 Excel Worksheet Functions 2 January 12th 07 10:46 AM
Importing checkbox data from web page Linda Ellison Excel Discussion (Misc queries) 0 April 18th 06 06:46 PM
CheckBox values Allan[_4_] Excel Programming 1 December 22nd 03 05:02 PM
Checkbox values from a web client Larry[_10_] Excel Programming 1 September 11th 03 06:45 PM


All times are GMT +1. The time now is 08:09 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"