There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen boot computer connection crash css dell display driver drivers email error ethernet excel explorer firefox firefox 3 freeze game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem router slow software sound trojan usb video virus vista windows windows xp wireless
Business Applications
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
Solved: Creating a table from a list of tick boxes


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
mackinlay's Avatar
Junior Member with 23 posts.
 
Join Date: Jul 2008
Experience: Intermediate
09-Jul-2008, 07:22 AM #1
Solved: Creating a table from a list of tick boxes
Hi there,

In Excel 2003, I am trying to write some code so that when I click on a tick box next to a list of headings (eg B4:B20), the heading and its related sub-headings (that are located on a separate sheet) are copied into a new sheet and arranged in a table (the macros have a function embedded in them that draws the lines and headings of the table). This means that only the ticked headings will be put into the new table and the irrelevant ones for a certain situation are not included in the table.

I currently have the code set up so that the title and sub-titles are pasted into the new sheet, but they are pasted into a specified cell. I would like to get it to paste into the next available free cell, rather than a pre-determined cell.

On top of this, I can currently paste in everything except for the tick boxes which are permanent features of the worksheet, whether I want them or not. Can these be pasted or do they have to stay assigned to a cell and remain there at all times?

I would greatly appreciate any help you can give me.

Thanks,
Mack
Dirizhor's Avatar
Computer Specs
Member with 64 posts.
 
Join Date: Apr 2008
Location: India
Experience: Advanced
09-Jul-2008, 08:41 AM #2
Use auto filter and select only the checked rows, copy them and paste into new sheet either by doing paste special or paste as required
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
09-Jul-2008, 08:42 AM #3
Hi Mack!
Welcome to TSG Forum
Could you upload a sample of your workbook, with code, so we could take a look at it! It will be easier to find a solution!
mackinlay's Avatar
Junior Member with 23 posts.
 
Join Date: Jul 2008
Experience: Intermediate
09-Jul-2008, 08:45 AM #4
here is an extremely reduced version of the workbook because of the file size limit i had to cut a load out! The only real difference though is that there are only a couple of options for the list, rather than the 20ish in the main workbook for both horizontal & vertical!

Cheers!
Attached Files
File Type: xls Rail Check List1.xls (63.0 KB, 9 views)
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
09-Jul-2008, 09:26 AM #5
Is possible to use something else, beside Checkboxes?
In which order should data be pasted in the new worksheet, in the order they are checked or in other order?
mackinlay's Avatar
Junior Member with 23 posts.
 
Join Date: Jul 2008
Experience: Intermediate
09-Jul-2008, 09:57 AM #6
yeah, check-boxes are not essential, just something equivalent is needed(preferably not having to type any thing or a drop down menu, but drop downs will do if necessary!)

It is the order that they are clicked on the dictates the order on the second list.

Thanks!
Dirizhor's Avatar
Computer Specs
Member with 64 posts.
 
Join Date: Apr 2008
Location: India
Experience: Advanced
10-Jul-2008, 09:41 AM #7
How about a Y for yes and N for no..
You can sort it with y or n and go ahead with it
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
10-Jul-2008, 10:17 AM #8
Try this one!
Attached Files
File Type: xls Rail Check List1.xls (66.0 KB, 6 views)
mackinlay's Avatar
Junior Member with 23 posts.
 
Join Date: Jul 2008
Experience: Intermediate
11-Jul-2008, 04:22 AM #9
Cheers AJ, it works really well. But I'm having a bit of trouble interpreting the code so that I can apply it to the entire workbook I have here. The 'makecheckboxes' section:

when you call it:

Code:
   Call makechekboxes(nr, 4, 2, shSh1)
and what is called:

Code:
Sub makechekboxes(nr, fistrw, Column, shsheet)
    For i = 1 To nr
        With shsheet.CheckBoxes.Add(406.5, 350.25, 72, 72)
            .Name = "Waw"
 
    Next
End Sub
I dont understand what the various numbers and abbreviations stand for. If you could explain this to me I would be VERY grateful!!

Thanks!!
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
11-Jul-2008, 04:48 AM #10
Quote:
Originally Posted by mackinlay View Post
Cheers AJ, it works really well. But I'm having a bit of trouble interpreting the code so that I can apply it to the entire workbook I have here. The 'makecheckboxes' section:
I tried to make a version with checkboxes, but, I didn't had enough time, so I made the version I posted, but forgot to remove these lines!

As for the code:
Code:
Sub makechekboxes(nr, fistrw, Column, shsheet)
    For i = 1 To nr
        With shsheet.CheckBoxes.Add(406.5, 350.25, 72, 72)
            .Name = "Waw"
 
    Next
End Sub
First to numbers refferes to the position of the checkbox, in the worksheet, and the second to it's dimensions (if I remember right)
__________________
The BestS
AJ
mackinlay's Avatar
Junior Member with 23 posts.
 
Join Date: Jul 2008
Experience: Intermediate
11-Jul-2008, 04:54 AM #11
so is it possible for me to update the code you've provided to add the checkboxes in? It appears that the majority of it is already in place?!
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
11-Jul-2008, 05:21 AM #12
One question.
What should happen when the checkbox (suppose you have checkboxes) is unchecked?
mackinlay's Avatar
Junior Member with 23 posts.
 
Join Date: Jul 2008
Experience: Intermediate
11-Jul-2008, 05:31 AM #13
On the 'inital check list' sheet, I really like the fact that currently, when you choose true the item is pasted and then when you choose false it disappears. So when the checkbox is unchecked, i would prefer it if the pasted items were removed.

Is that what you were asking?!
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
11-Jul-2008, 05:38 AM #14
Yes it is!

In this case when the chekbox on the 'inital check list' sheet, you need to create a new set of checkboxe (one for each line of text which will be pasted), and remove them when it's uncheked!
It's a little more difficult whit the second part, thats why I preferred the True/False combo!
__________________
The BestS
AJ
mackinlay's Avatar
Junior Member with 23 posts.
 
Join Date: Jul 2008
Experience: Intermediate
11-Jul-2008, 05:57 AM #15
yeah, the true/false seems to work really well in the sheet you sent. Its not the end of the world if the checkbox idea doesnt come off, it is just a much more physical selection of which items in the list are required!
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:57 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.