« first day (871 days earlier)      last day (2309 days later) » 

12:01 AM
RELOAD!
[Zomis/Duga] 2 commits. 59 additions. 33 deletions.
 
 
4 hours later…
3:38 AM
[retailcoder/BrainFuck] retailcoder pushed commit 5b22b2c7 to dev: regrouped repeated tokens into instructions; executes "hello world" and "print the alphabet", but throws an InfiniteLoopException with "fizzbuzz".
 
3:53 AM
[retailcoder/BrainFuck] retailcoder pushed commit bee1ae02 to dev: fixed LoopBlockSyntax bug with nested loops - all tests pass.
[retailcoder/BrainFuck] retailcoder pushed commit b164b85c to dev: fixed fizzbuzz test
 
4:53 AM
@Jelly This is why I said I'd take a bandaid instead of a beer:
 
 
1 hour later…
6:11 AM
A split thumb? @Jelly is that your nail bitting experience taken too far?
I get the idea people feel nervous bite their nails but sorry it hurts.
 
 
4 hours later…
10:35 AM
0
Q: How do i apply the code i have, to multiple checkboxes?

Steve101Private Sub SetCompletionStatus(ByVal isCompleted As Boolean, ByVal section As Object) Const CompletedColor As Long = VBA.ColorConstants.vbGreen Const OutstandingColor As Long = VBA.ColorConstants.vbRed section.Caption = IIf(isCompleted, "Complete", "Outstanding") section.BackColor = IIf(isCompl...

 
 
2 hours later…
12:41 PM
[Vogel612/TranslationHelper]‌​ Vogel612 pushed commit 3c79b5ad to TranslationProjects: Moved some things around ... broke a few things. nothing serious
> Here's the log.
[RubberduckLog.txt](https://github.com/rubberduck-vba/Rubberduck/files/547789/RubberduckLog.txt)

I had the workbook open, got distracted. Came back to it & hit F11 to open the VBE. I had not yet hit the parse button.

Closed the file, closed Excel, reopened & everything appears to be OK.
> FWIW, this does seem to be resolved in Access & Excel (2010, 32-bit) in RD 2.0.9.
[Vogel612/TranslationHelper] build for commit 3c79b5ad on TranslationProjects: The Travis CI build could not complete due to an error
BUILD FAILURE!
[Vogel612/TranslationHelper] build for commit 3c79b5ad on TranslationProjects: The Travis CI build could not complete due to an error
BUILD FAILURE!
 
 
1 hour later…
3:03 PM
0
Q: VBA Macro - Speed decreasing with every loop iteration - substituting word bookmarks from excel

Da SpotzI previously asked this question but have since improved my code. The original question is here: Substituting bookmarks in a Word document with data combined from an Excel sheet What happens in the code: Information about a list of suppliers needs to be consolidated into a word document that m...

 
4:03 PM
@PeterMTaylor A split toe.
 
 
4 hours later…
8:24 PM
Which part of what is the upper bound of ARRAYX is unclear? — Mat's Mug 6 secs ago
this is my last comment with that OP
ffs
 
8:35 PM
@Mat'sMug IKR
 
Thanks Mat - NUM is fine and when that number is added to the array in VBa it works - ie, NUM is 1, ARRAYX(1,1) is fine, ARRAYX(NUM,1) overflows — Dan S 19 secs ago
IT'S NOT AN OVERFLOW YOU DUMMY
This makes no difference whatsoever. What matters is THE VALUE, not where it's coming from. Add error handling and verify the values of i and j when the error is thrown, and more importantly the value of that cell - i.e. learn to debug your code. And "out of bounds" isn't "overflow", if you're getting an "overflow" then you're overflowing the Integer type, most likely with a value greater than 32,767. So, not "overflow", "out of bounds". Correct terminology helps being correctly understood when people aren't looking at your screen. — Mat's Mug 47 secs ago
he definitely didn't add the goddamn error handler
 
I have a problem with a thingy when the widget gets a thingamajig, I can't tell if widget is a variable, Class, overflow, a loop, a GUI setting or a pointer, and I don't know why it keeps changing. Why can't you help me dammit. Argh, SO is full of know-it-all that don't actually know anything
 
LOL
why did I even answer that one
 
Seems to be a thorough misunderstanding of what a variable actually is. Maybe Grade 5 Algebra would help.
 
thorough misunderstanding of everything
2
"it works when it comes from A1" - yeah, well, because A1 contains a legal value.
"it goes boom when it comes from Cells(i,j)" - yeah, well, because Cells(i,j) contains an illegal value
 
8:49 PM
Can't tell us what, i, j or Cells(i,j) are.
 
or even A1
thinks "A1" is what's making it work, and won't hear anything about it not being the case
"My code works, I have no idea why"
 
1+1=2, ergo, x+x=2, ergo 5+5=2
4
 
Hi guys =D
 
hi!
 
I was looking for a way to import random CSVs with all columns as text type
eg: .TextFileColumnDataTypes = Array(2,2,2,...)
The problem was how to make an array of let's say 100 element with a value of 2
but the problem is that it gives a variant array while the TextFileColumnDataTypes expects an array :-/
am I overthinking this and there's a simpler way ?
I simply want all columns to be set to text :x
the number of columns is unknown hence the 100 array size
 
8:59 PM
@Mat'sMug sigh...
Odd, @DanS, you come here asking for advice on how to make your code work, then when someone gives you a suggestion (which I'm going to go out on a limb and say is the root of your problem), you tell them that it is wrong without ever attempting to implement what has been suggested to you. Mat's Mug has much more patience than I... — FreeMan 30 secs ago
 
BTW the in the SO link above: you create a string using REPT function then you split it... easy but you end up with a variant array :<
 
variant arrays are fun!
it's typed arrays that are a pain. it's almost as if VBA wasn't even designed to work with them
@DanS add the error handler for goodness' sake. — Mat's Mug 6 secs ago
it sounded much less PC in my head
 
@Enissay - will a byte array do?
  Dim b() As Byte
  b = StrConv(String(100, Chr(2)), vbFromUnicode)
 
@ThunderFrame um, not specified here I think: msdn.microsoft.com/en-us/library/office/ff193261.aspx
wait let me read again xD
 
or convert to Variant?
  Dim b() As Byte
  b = StrConv(String(100, Chr(2)), vbFromUnicode)

  Dim v As Variant
  v = CVar(b)
 
9:12 PM
Thanks I will try your error handler code when I get it to go past the first loop - at the moment NUM is 0 because thats the number I start on .(Max legal NUM in the array is 250 as stated) - it just wont accpet NUm as a part of the array query unless num was assigned from a cell outside the loop — Dan S 33 secs ago
it's F'n hopeless
Ok. For what it's worth, I give up. Good luck. You have a runtime error, you want to debug the runtime error. Add a runtime error handling subroutine and break in that handler, verify your values. Or, keep thinking A1 makes any kind of a difference. — Mat's Mug 4 mins ago
 
There can't be any errors because I didn't mean to write any errors.
 
@ThunderFrame omg it worked, the byte solution
Thanks a lot <3
too bad I wasted time on a dead end solution... but again if I didn't take that path, I wouldn't ve seen the dead end :-/
 
@Mat'sMug We need a term for that kind of question. It's kind of like an XY problem, but backwards. An XX problem?
 
BSODs make you stronger
2
I have a problem but I can't tell you what it is
 
lol
Was hoping to finish this small module before heading to bed... I failed xD
Will retry tomorrow...
thanks again guys and see you <3
 
9:19 PM
@Comintern I'd go with "blind, deaf, blood-sucking vampire that doesn't realize he's a vampire and thinks the problem is with the mirror."
 
@ThunderFrame My problem is [wrong problem], why is VBA being wrong?
Needs more profanity.
2
 
default answer to that type of question should be.
You're probably right, Excel and VBA are downright awful at handling arrays. Have you considered writing this in machine code?
 
gah, being mean in a public chat isn't a good idea.
@Comintern "this comment" link points to @ThunderFrame's profile ;-)
 
Doh!
 
and @Kyle's
this is going to be such a weapons-grade facepalm when he gets that "ah!" moment...
 
9:27 PM
but burgers flip when I flip 'em, don't flip when I tell the flipper to flip 'em
 
Fixed. How did I miss with the right-click twice?
 
bad aim. happens all the time, wife says.
 
@Dan S. This is NOT a hard problem to solve. You have had good advice from several advanced VBA users, and you have ignored them all. They have not given up on solving your problem, they have given up on you. Restating your beliefs will not change or fix the bug. Add the error handler, discover what i, j, and Cells(i,j) is, and get on with it. — ThunderFrame 1 min ago
 
0
Q: Prevent Variable Overflow from InputBox user error

Jacob BischoffI was writing some code that required the user to input a number, which was then stored in a variable. While testing the code I input a number larger than the variable type would allow and I got an variable overflow error. So I wrote this code to prevent that from happening. It works, but I was...

 
9:50 PM
It seems my machine is behaving strangely - giving differnt answers after a rest. Mat's error handling is much appreciated. — Dan S 51 secs ago
dear god
 
Interesting ^^^. Makes sense, but I would have guessed that these would both be compiler errors:
Private Function example() As Long
    Dim example As Long     '<-- Duplicate declaration in current scope.
End Function

Private Sub example()
    Dim example As Long     '<-- Compiles just fine.
End Sub
 
IKR
A Function is a procedure that returns a value to the caller, much like InputBox is. You would have to remove the Dim PreventOverflow As Long declaration though, because it having the same name as the function it's declared in would be a compile error (duplicate definition in current scope), because you assign a function's return value by assigning the function's identifier - so you can't have a local variable in a function with the same name as that function. — Mat's Mug ♦ 2 mins ago
 
Oddly, this also doesn't recurse:
Private Function example() As Long
    example = example
End Function
 
0
Q: Word VBA: "Ambiguous Name Detected" for ActiveX Labels

wongnogI have a Word document originally created on a Windows 7 32-bit machine, that is now giving me problems since switching to Windows 7 64-bit. Both systems are running Word 2010 (v14.0.7173.5000, 32-bit). The Word document has many ActiveX Labels, and a large macro which links each ActiveX Label ...

^ poor dude needs to redo all his ActiveX controls
or rename all handlers and references to controls
and last released RD can't see them
"tough luck"
 
@Comintern, but this does:
Private Function example() As Long
    example = example()
End Function
and in a class, the RHS can share the property name
Private m_example As String

Public Property Let example(example As String)
  If Me.example = vbNullString Then
    m_example = example
  End If
End Property

Public Property Get example() As String
  example = m_example
End Property
 
10:06 PM
@ThunderFrame OMG the ONLY time empty parens make any difference in VBA
 
10:27 PM
IKR - qualification by parentheses is so readable
VBFA
 
11:02 PM
Is a Const declared inside a procedure treated as Static? i.e. If I have a function that I intend to call 1,000,000's of times, is there any difference between declaring the Const as private to the procedure or private to the module?
 
I'm not sure. It depends on if the compiler optimizes the code and inlines it.
 
hmm, seems I can change the value of the procedure const between calls
 
If it's module level, it should wind up in the heap instead of the stack though. Unsure what the performance implications of that would be.
 
Sub test()
  Dim i As Long
  For i = 1 To 2
    Debug.Print foo
    Stop
    'Toggle the commenting of the const statement
  Next i
End Sub

Function foo()
  Const x As String = "XXX"
'  Const x As String = "YYY"
  foo = x
End Function

'Prints:
XXX
YYY
 
Doesn't that force a recompile though?
 
11:12 PM
I have compile on demand set to unchecked.
 
It should still have to recompile it though.
Just benchmarked it, module level is ~5% faster.
Although we're talking about a half second over 100 million assignments.
 

« first day (871 days earlier)      last day (2309 days later) »