« first day (162 days earlier)      last day (656 days later) » 

12:44 PM
This is what I like about SO, I keep finding useful stuff even after a year of being on here
 
 
2 hours later…
2:46 PM
Okay I need some help finding this, I know it was answered a while ago but I cannot find it. How to list the sheets in a column on a single sheet. I know there is a way using the name manager but for the life of me I cannot find it.
 
hmm. I'd probably go with a UDF, e.g. =SheetName(A1) where A1 contains the index. or perhaps =SheetName(Row()-1)
 
I would too. This is for another question on SuperUser.
I know it used an old reference that is still there but not published.
I know the answer was given by @ScottHoltzman, but I cannot find it in his history.
 
I don't recall seeing it :(
 
It was about 6 to 9 months ago. Oh well, I will keep hunting. Then save it to my favorites.
 
3:25 PM
@Mat'sMug to your comment *How about calibrator = Array(0, Range(Cells(i, 12).Value, Cells(x, 12).Value))? * wouldn't that fill an array with 0 in the first spot and a two dimensional array in the second spot? I do not believe that the formulas will accept that as criteria, without throwing a mismatch error. But as has been proven, you know more than I.
 
Can anyone in here help me with a Word vba/active x problem?
 
@ScottCraner that's probably correct - TBH I didn't really read the question, I was just addressing the part of the answer that said "You are not allowed to do so, because VBA thinks that in your array you get a 0 and a range. Thus, your array consists of two different types of values" .....and I don't think I know more than you do... just different areas :)
 
@Steve101 If you activeX is broken may not be much anyone can do
 
What if im on 2016?
Its not broke its just buggy as help, in the way of graphical corruption while scrolling, that is.
 
just how many controls are there?
 
3:33 PM
it's a 15mb doc. It's got a lot of check boxes with text, a few command buttons and some labels. When i scroll they glitch, sort of pop inwards more and the text moves and goes smaller then when i stop scrolling it pop backs to normal..
 
do "form controls" glitch the same as "activex controls"?
 
@Mat'sMug legacy forms?
 
No they are fine, but cant write code for them, which is why i am using active x ones.
 
you can assign them to a macro
and even better, you can assign them all to the same handler, so you get much cleaner and easier to maintain VBA code
 
3:39 PM
This is the kind of code i am running with, you sure it can be done with a macro?

Private Sub PreReqCheckBox_Click()
If (PreReqCheckBox.Value = True) Then
Section1Complete1.Caption = "Complete": Section1Complete1.BackColor = RGB(0, 255, 0): PreReqBy.Caption = UpgradeTechnic.Text
Else
Section1Complete1.Caption = "Outstanding": Section1Complete1.BackColor = RGB(255, 0, 0): PreReqBy.Caption = ""
End If
End Sub
 
definitely
doesn't look like a single handler will do though
 
I wouldnt know where to start lol, and would it be long and hard to do, because i have a lot of checkboxes, also some of them with a click of a button get hidden on the document, and when that is done they need to be triggered to be ticked, will it still have that functionality?
 
exactly what is "a lot"?
 
a few big chunks of that was written by someone else so if you tell me thats it is terrible and compare it to "duct taping" a word doc together, i would be inclined to agree!
 
Public Sub HandleCheckboxClick()
    Select Case Application.Caller
        Case "Check box 1"
            DoSomething
        Case "Check box 2"
            DoSomethingElse
    End Select
End Sub
oh wait, that works in Excel... haven't tried in Word
I assume it's the same
 
3:45 PM
you would think, theres a lot that is different, i learned that the hard way lol..
 
gosh, all these instruction separators are a living headache
 
so would it be something like this?
Public Sub HandleCheckboxClick()
Select Case Application.Caller
Case "Check box 1"
If (PreReqCheckBox.Value = True) Then
Section1Complete1.Caption = "Complete": Section1Complete1.BackColor = RGB(0, 255, 0): PreReqBy.Caption = UpgradeTechnic.Text
Else
Section1Complete1.Caption = "Outstanding": Section1Complete1.BackColor = RGB(255, 0, 0): PreReqBy.Caption = ""
Case "Check box 2"
If (DTSCheckBox.Value = True And AdminCheckBox.Value = True) Then
Section2Complete.Caption = "Complete": Section2Complete.BackColor = RGB(0, 255, 0): CheckAndAmmendBy.Caption = Upg
 
the code works as-is, right?
 
yes it works fine.
 
I'd suggest to take it to Code Review
 
3:47 PM
was about to ask if there was a place i can hand it in and get it "fixed" lol
 
make sure you title the post with a short description of what it does (e.g. "Handling dozens of checkbox events in a Word document"), and describe your code and its purpose in the post.
 
So just one post to re-do all the check boxes?
 
that's the whole module?
CR has about double SO's character limit per post :)
 
I'll just post one checkbox code and ask if someone can help, then give them the rest later on pm or something.
 
you'll be getting feedback on any & all aspects of the code, and tips to remove redundancies, improve efficiency and end up with overall code that's easier to deal with
it's usually best to include as much context as possible
 
3:53 PM
I'll send you a quick link after i have posted :)
 
I'll probably see it before you get to paste the link haha
 
suggested tags? word word-vba activex
They ok?
lol, doesnt even have half of them, ms-word and vba will have to do.
0
Q: Handling dozens of checkbox events in a Word document

Steve101So i have a word document which has a lot of active x checkboxes on it and i have just been told the way it has been coded and done could be improved upon a lot, so i am asking for a bit of help. To dumb it down, the checkboxes are tied to a "completion overview" at the bottom of the document. ...

 
yep. although I'd argue that dumbing it down isn't to your advantage on CR.
 
Well i only dumbed down the explanation of what they did, didnt wanna go into huge detail.
 
I mean the code itself :)
 
4:02 PM
AH, ok lol, well i would have to go through my vba and grab all the code relating to the checkboxes, which is more effort than i am willing to give at the moment to be honest... lol.
 
just grab the whole module and dump it in there - and note that reviewers can spend more than a whole hour (or more!) answering a CR question; usually the more effort in the OP, the more rewarding and useful the answers.
make sure the code in the post looks exactly like it does in your IDE, too
also if you can include a screenshot of the document, do it - the more context reviewers have, the more detailed answers can be.
 
I could just put the document on but would need to go through take passwords out and to in depth stuff out as its an upgrade guide for my companys software and databases.
I'll pop some screenshots on there.
 
4:21 PM
CR in a nutshell: "does this code make my ass look fat?"
(a quote from Jeff Atwood himself :)
you might want to embed the pictures in the post, too (Ctrl+G)
got my upvote now anyway
 
5:15 PM
@Steve101 just toying with controls in Word ....dayum they're a PAIN!!
basically form controls in Word have nothing to do with form controls in Excel
 
 
2 hours later…
6:56 PM
in The 2nd Monitor on The Stack Exchange Network Chat, 3 mins ago, by Duga
This is the wrong forum. If you want to make it faster take it to codereview.stackexchange.com They specialize in doing this sort of thing, and are much smarter than me. — Scott Craner just now
 
@Mat'sMug I am being lazy and shuffling the work to you guys. :)
 
one day, we'll convert you :)
 
 
2 hours later…
9:12 PM
Hello
@Mat'sMug are you here?
 
@JonathanRauscher hi! how may I help you?
 
9:35 PM
^ hostless VBE toolwindows
yes, this is broken
RD 2.0 isn't quite ready to ship as "stable" yet :-/
 
@Mat'sMug Hello
I could use some assistance with an Excel VBA scrub question. It's simple really
Could you assist?
 
9:59 PM
leave me the info here, I'll check it out later - I need to get stuck in traffic at this time :)
 

« first day (162 days earlier)      last day (656 days later) »