What code are you using? It should be perfectly possible to do that (though I'd probably use a listbox myself - you can style it with checkboxes too if you like).
What code are you using? It should be perfectly possible to do that (though I'd probably use a listbox myself - you can style it with checkboxes too if you like).
Everyone who confuses correlation and causation ends up dead.
Here is my current code. (Functionality is not complete, but you get the gist). I've put faces at the important lines
Dim getBk As Workbook, getStr As String, setBk As Workbook, boxes(1 To 255) As Control, ws As Worksheet
getStr = Application.GetOpenFilename
Application.ScreenUpdating = False
Set getBk = Workbooks.Open(getStr)
For Each ws In getBk.Sheets
sheetGetter.Height = sheetGetter.Height + 18
Set boxes(ws.Index) = sheetGetter.Controls.Add("Forms.CheckBox.1", "box" + CStr(ws.Index), True)
boxes(ws.Index).Top = 50 + (ws.Index - 1) * 18
boxes(ws.Index).Caption = ws.Name
Next
getBk.Close (False)
The "cool" face is where I define the control itself. The "mad" face shows what's not working. I'm going to look into the listbox and see if that makes more sense to my purposes. I have a feeling that I might run into a similar problem, though. Thanks.
Nick.
Nevermind. I'm doing the listBox. It makes much more sense. Thanks for the tip!
Redux,
Please edit your post to add code tags.
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks