I have a form with many multiselect listboxes on it. I want to loop through each list box and get the selected items to copy to excel. I am getting a casting error "must be less than infinity"
For Each box As Object In Me.Controls '****INFINITY ERROR*****
If TypeOf...
I'm having multiple problems with this. Everytime I think I'm making progress I take 7 steps back. I'm running in circles.
ANY help is greatly appreciated. Here's the whole thing with comments on the problems.
Imports Microsoft.Office.Interop
Public Class ScopeSheetBuilder
Dim excel As...
You got it perfectly. There is a character between head and sheet.name i didn't think it would matter since i was using contains instead of equals. i'll give it a try.
Fingers Crossed! Thanks!
Jacque
What am I doing wrong here? When I put in manual text after the line return it fill in but as is it doesn't pick up all the checkboxes under HEADINGS. It does create all the sheets under SHEETS.
'SHEETS
For Each ctrl As Control In Me.Controls
If (TypeOf ctrl Is CheckBox AndAlso...
I have a windows app with check boxes & a button. I want a copy of the existing sheet in the excel workbook to be made and named for every check box that is checked. I am getting an error that I need a new instance but i'm not sure where to put it.
Please help
Dim excel As...
I have a windows app with check boxes & a button. I want a copy of the existing sheet in the excel workbook to be made and named for every check box that is checked. I am getting an error that I need a new instance but i'm not sure where to put it.
Please help
Dim excel As...
Only in the end there will be 75 sheets and the headings and items are no longer checkboxes because while the code was perfectly good, I was dealing with a form that needed 2080 controls and that wasn't good so now the items will be in multi select list boxes and only the sheets will be...
'BACK TO TOP
Private Sub BackToTop1_Click()
ScrollBar1.Value = 0
End Sub
Private Sub CommandButton1_Click()
Dim lngIndex As Long
Dim blnArray(75) As Boolean
'CREATE THE SHEETS
For lngIndex = 1 To 75
If ScopeSheetCreator.Controls("CXSheet" & lngIndex).Value = True Then
Sheets("Template...
WOW! Thanks everyone. Dave, I started to use that but got side tracked. i tried it but now i am getting an error at this line
wb.Sheets("Template").copy(after:=sheets.Count, Name:="chbx.text")
Jacque
I am trying to convert a perfectly good VBA code to Visual Basic using Visual Studio 2008 Express and I am getting an Invalid Cast Exception.
Any help is extraordinarily appreciated. I'm about worn out with this project.
Here's my code:
excel = New...
combo,
I tried to put the check boxes directly on the excel worksheet and it just kept crashing. So far I have about 1800 of the Checkbox/Textbox combos on the form. It hasn't crashed but everytime I make even the smallest change, like renaming one of the controls (and obviously I will have to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.