« first day (171 days earlier)      last day (3009 days later) » 
00:00 - 20:0020:00 - 00:00

12:25 AM
@RubberDuck what if I tell you that there's a feature that displays a dockable treeview showing all opened VBProjects, with all their modules and members.. and that you can use that tree to navigate anywhere?
still working on a few little stupid bugs though, but..
 
I would be bloody amazed brother.
 
feast your eyes on this @ducky!
now this has shed a bit of light on a few Parser bugs
the position of an Instruction is
and member accessibility is not very obvious to get
(CreateCommand should be displayed as a private method here)
and there's a glitch with ending the DoLoopNode block
just pushed it, if you want to sync & take a look :)
for some reason you need to click twice on the "Parse Module" menu button to bring up the window
 
Oh no. You hit that bug.
 
lol
 
Yeah. I'll have to sync and look at it.
 
12:36 AM
something tells me I know a duck that's been there
 
I ran into it when I tried to make something else inherit from menu.
 
interesting.. I put the logic into a DockablePresenterBase
 
Not much different from what I tried.
Give it time, Excel will crash.
 
oh great
 
Open something else up after the explorer is open.
Actually, open the TestExplorer.
Save your workbook first.
 
12:42 AM
hmm.. if I bring up the TestExplorer, and then try to bring up the CodeExplorer, it closes the TestExplorer
so yeah, I then bring up the CodeExplorer, ...works. and then the TestExplorer just won't show up.
interesting
didn't crash [yet] though
 
Well, not crashing is better than I managed.
 
Not crashing is a good start
2
 
I've thought about putting CreateToolWindow in a static class and seeing if that behavior changes.
 
hey @Phrancis
 
Yo
 
12:48 AM
and it's caused by ...having a base class??
 
It's caused by two classes sharing a base class with that code in it.
Well, wouldn't say that's what causes it. I don't know what causes it.
I just created my first *.msi file though. =)
 
nice!
@RubberDuck this might have something to do with it:
    public abstract class DockablePresenterBase
    {
        public const string DockableWindowHostProgId = "Rubberduck.DockableWindowHost";
        public const string DockableWindowHostClassId = "9CF1392A-2DC9-48A6-AC0B-E601A9802608";
    [ComVisible(true)]
    [Guid(ClassId)]
    [ProgId(ProgId)]
    public partial class DockableWindowHost : UserControl
    {
        public const string ClassId = "9CF1392A-2DC9-48A6-AC0B-E601A9802608";
        public const string ProgId = "Rubberduck.UI.DockableWindowHost";
hmm.. now I wonder which ProgId I have the class registered as
 
Probably as Rubberduck.DockableWindowHost, change it to UI.
 
oh look at that... I can bring up the ToDoItems window, and then bring up the CodeExplorer; then I give focus to the ToDoItems window, and when I try to bring up the TestExplorer, VBE gives the focus to... guess!
the CodeExplorer!
 
Yeah. I'm not pulling that.
At least not into my master branch.
Getting the com exceptions yet? Or are you running it detached from vs?
 
1:03 AM
not yet. I want to figure that one out.
it seems to get confused at one point... I click "TestExplorer" and it's the CodeExplorer that's brought up.
 
I don't understnad the whole "it takes two clicks" thing either.
 
oh I think I just found something
ToDoItemsMenu has these constants defined in CreateToolWindow:
        const string progId = "Rubberduck.UI.DockableWindowHost";
        const string dockableHostGuid = "{9CF1392A-2DC9-48A6-AC0B-E601A9802608}";
I've put this into DockableWindowHost:
    [Guid(ClassId)]
    [ProgId(ProgId)]
    [ComVisible(true)]
    public partial class DockableWindowHost : UserControl
    {
        private const string ClassId = "9CF1392A-2DC9-48A6-AC0B-E601A9802608";
        public static string RegisteredClassId { get { return ClassId; } }

        private const string ProgId = "Rubberduck.UI.DockableWindowHost";
        public static string RegisteredProgId { get { return ProgId; } }
and now if I comment out the constants in ToDoItemsMenu.CreateToolWindow...
            toolWindow = _vbe.Windows.CreateToolWindow(_addIn, DockableWindowHost.RegisteredProgId, toolWindowCaption, DockableWindowHost.RegisteredClassId, ref userControlObject);
..and use the constants instead
now that just broke the ToDo window as well.
I think we might need a progid for each dockable window
oh wait
const string dockableHostGuid = "{9CF1392A-2DC9-48A6-AC0B-E601A9802608}";
private const string ClassId = "9CF1392A-2DC9-48A6-AC0B-E601A9802608";
I bet these braces make a difference
 
the host window is supposed to make it so you don't need a different registration for each of them.
supposed to.
 
1:33 AM
Moment of truth. Let's see if this installer works.
sigh
 
1:55 AM
Almost...
 
almost?
> GuidPosition (String type): a unique GUID that identifies the toolwindow. Visual Studio uses this identifier to persist the size and position of the toolwindow. So, each toolwindow should have a different GUID
 
2:12 AM
Damn that MZ tools guy. Wtf?
Yeah. Almost. Add in runs, but unit tests don't work because it's not registered properly with the GAC.
 
what's being deployed to GAC exactly??
(there shouldn't be anything in the GAC)
@RubberDuck look what I've found!
            // Get if the toolwindow was visible when the add-in was unloaded last time to show it
            registryKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\MyToolWindow");
            if (registryKey != null)
            {
               if ((int)registryKey.GetValue("MyToolwindowVisible") == TOOLWINDOW_VISIBLE)
               {
                  ShowToolWindow();
               }
               registryKey.Close();
            }
definitely looks like each toolwindow needs its own GUID
would it really hurt to ?
 
No. It wouldn't hurt. Just need to figure out the window resizing.
Wait. The installer didn't put a tlb file in here...
That might be the problem.
 
@RubberDuck ok I'm trying something
 
2:45 AM
wow... this article applies to VisualStudio.net add-ins...
this is what I had bookmarked
still:
> A GUID to uniquely identify the toolWindow. The VBA editor uses this GUID to store information specific to each toolwindow, such as its size or position.
(reading)
@RubberDuck fixed. The GUID you need to pass is that of the user control, not that of the WindowHost
so I've created this interface:
    [ComVisible(false)]
    public interface IDockableUserControl
    {
        /// <summary>
        /// Gets a string representing the qualified name of the registered class.
        /// </summary>
        string ProgId { get; }

        /// <summary>
        /// Gets a string containing the GUID with which the class is registered.
        /// </summary>
        string ClassId { get; }

        /// <summary>
        /// Gets a string containing the caption of the toolwindow.
        /// </summary>
and now I'm refactoring the dockables
 
3:19 AM
You're a genius @Mat'sMug.
 
lol
nah, ProgId isn't needed on that interface ;)
 
@Mat'sMug the installer works. =)
 
great!
 
Oh I frakkin love this.
 
todo's are only for the ActiveVBProject?
 
3:27 AM
My desktop screen is big enough to fit the all of these window....
Yeah. It made sense at the time.
What it really needs is an optional filter.
 
I love that SetSelection overload/extension method!
 
You're welcome. =)
Pretty isn't it? What, like one line of code?
 
pretty handy still
 
I meant to ask, the string extension. HasComment does what I think it does?
if (somestring.HasComment())
{...
 
yeah. returns true if there's a comment, and returns the comment in an out parameter
 
3:30 AM
I'll be putting that to good use.
 
no, actually.. it returns the position at which the comment starts..
 
And it works with REM too? I didn't look real close.
Been focused on other things.
 
                if (instruction[cursor] == CommentMarker
                    || (cursor == ReservedKeywords.Rem.Length
                        && instruction.TrimStart().Substring(0, ReservedKeywords.Rem.Length) == ReservedKeywords.Rem))
yup
the parser needed it to work with Rem
 
Hmmmmm I should probably dog food the parser instead of hacking in HasComment.
 
I don't like TryGetMarker being called Try... without a method called GetMarker. It kinda breaks POLS.
 
3:37 AM
Feel free to mention it on CR. I don't like TryGets period.
I just don't see a better way to do it.
out param smell.
 
private bool HasMarker(string line, out ToDoMarker result) works for me
 
I'm not territorial Mug. Go ahead and change it.
 
Is out the new goto?
 
YES.
 
lol
 
3:39 AM
> Okay, so just how the hell do we find out what kind of procedure we’re working with? How do we find out whether we’re dealing with a Property or a Subroutine?
> That’s right. procKind is an Out parameter. It gets passed by reference. So where all of the other “Proc” properties of a CodeModule need to know what kind of procedure they’re working with, ProcOfLine is the one that actually returns it.
To hell with out params.........
 
^^ that's because VBA only has ByRef - out is pretty damn explicit ;)
 
Yeah. There's no messing around with it that's for sure. The compiler all but YELLCASES at you.
 
and the caller requires the out too
 
switching machines be right back
So many windows...........
 
@RubberDuck Good.. I'm refactoring the whole ToDo code into implementing IDockableUserControl and leveraging the DockablePresenterBase
 
3:54 AM
Okay brother. I'm out.
ttys
 
later!
 
 
2 hours later…
6:06 AM
@RubberDuck the dockable stuff is no longer a problem, feel free to sync anytime
TTGTB
 
 
4 hours later…
9:42 AM
4
Q: Late binding an array

vba4allI am seriously stumped as I can't find anything on late binding an array in VBA. Is this even possible? If yes, how? If not - why? Note: I don't mind if it's possible using a native .Net/C# types like Dim o as Object set o = CreateObject("System.Array") Even though the System.Array is COM vi...

 
 
3 hours later…
12:33 PM
Hi @vba4all!
@RubberDuck I..... didn't run the tests.......
 
12:51 PM
@Mat'sMug hello
 
I'm such a sloppy dev.
That was a very good SO post BTW
It's hard to swap years of F5-testing for unit tests
 
I know exactly what you mean
i almost went for a job that would require me to do unit testing all day long
good thing i almost went for it.. i would regret haha
 
@Mat'sMug No worries Mug. I need to get into the habit too.
Good morning (afternoon?) @vba4all.
> Hmm.. I broke this too I think.
What's that about? ^
 
@RubberDuck afternoon :)
 
1:07 PM
@RubberDuck me not running the unit tests
 
LOL. Oh. Gotchya. No biggie.
It just took me a little longer than I thought it would to merge the setup project in.
Besides, there weren't any tests at the time.
 
hey guys this is a VBA not C# chatroom :P (just kidding, doesn't bother me)
 
Oh. Yeah. I kind of forgot... but it IS about VBA.
Or, at least about making it's IDE better. =;)-
 
1:49 PM
@vba4all you can now browse a VBA code base in a treeview, and navigate anywhere with a double click :)
 
@Mat'sMug looks really nice
is that XML based?
 
@vba4all What do you mean?
 
i mean like mz-tools have done it
 
You mean the parsing itself?
 
export/import
in mz tools you have this
 
1:53 PM
Dude, that code explorer is sweet. I think I might create a new installer at lunch time and update my work machine...
 
Other utilities - Generate XML documentation
that exports all sorts of data about the VBA project
in an xml file
 
No. Mat's parsing the actual code modules, but there's no reason we couldn't export documentation like that eventually.
 
then you can pop that in a web browser and see all properties of the object module
 
Yeah. That's one of the features I really like about MZ.
 
Ooh that would be possible.. I see a new feature brewing :)
 
1:57 PM
i was just wondering if thats how it's done in your add-in as I havent really followed the making of that much
 
We'll have import/export and GitHub integration when we're done!
 
Damn right we will.
 
2:31 PM
Monking dudes
 
Hey @Phrancis. How goes the Outlook project?
 
Untouched so far, just got here :)
Got a bit of SQL to run in Access to fix some stuff. Yay.
 
@vba4all I think a SynyaxTreeNode can be xml-serialized with pretty much 0 effort. I'm making a note to look into that.
 
@Mat'sMug I think so too.
 
2:47 PM
This chat room is on fire always
 
Contract_Purcahse_Date Nice one SSRS guys
 
Ugh. Speaking of SQL... anyone want to help me with what should be simple but is causing me all sorts of grief? lol
I am trying to get a list of Fridays and am using:
> dateadd(week, 0, dateadd(d, -((datepart(weekday, getdate()) + 1 + @@DATEFIRST) % 7), getdate())
> dateadd(week, 1, dateadd(d, -((datepart(weekday, getdate()) + 1 + @@DATEFIRST) % 7), getdate())
etc
 
@RubberDuck might not be deserializable though
 
@Mat'sMug Doesn't need to be though, does it?
 
Not sure
 
3:00 PM
@enderland How about: SELECT foo FROM bar WHERE DATEPART(dw, bar) = "Friday"
 
I'm using it in a weird case select grouping
> declare @mDate datetime

set @mDate='11/20/2014'

select dateadd(week, 1, dateadd(d, -((datepart(weekday, @mDate) + 1 + @@DATEFIRST) % 7), @mDate)) union select '11/21/2014'
select dateadd(week, 2, dateadd(d, -((datepart(weekday, @mDate) + 1 + @@DATEFIRST) % 7), @mDate)) union select '11/28/2014';
select dateadd(week, 3, dateadd(d, -((datepart(weekday, @mDate) + 1 + @@DATEFIRST) % 7), @mDate)) union select '12/05/2014';
where I have something like:
> SELECT
CASE
WHEN p.DateEstimatedDesignComplete <= GETDATE() THEN 'PastDueProjects'
WHEN p.DateEstimatedDesignComplete <= dateadd(week, 1, dateadd(d, -((datepart(weekday, getdate()) + 1 + @@DATEFIRST) % 7), getdate())) THEN 'Due1Week'
WHEN p.DateEstimatedDesignComplete <= dateadd(week, 2, dateadd(d, -((datepart(weekday, getdate()) + 1 + @@DATEFIRST) % 7), getdate())) THEN 'Due2Week'
and I want it to check, inclusively, if a given date in the query (the p.DateEstimatedDesignComplete) is within the Friday of weeks, to figure out how many weeks out it's "due"
But I don't know how to make it "inclusive" of the current friday, it always pushes that to the next week
 
That does sound weird
 
@Phrancis the problem is for dates which are Fridays like this:
> declare @mDate datetime

set @mDate='11/21/2014'

select dateadd(week, 1, dateadd(d, -((datepart(weekday, @mDate) + 1 + @@DATEFIRST) % 7), @mDate)) union select '11/21/2014'
select dateadd(week, 2, dateadd(d, -((datepart(weekday, @mDate) + 1 + @@DATEFIRST) % 7), @mDate)) union select '11/28/2014';
select dateadd(week, 3, dateadd(d, -((datepart(weekday, @mDate) + 1 + @@DATEFIRST) % 7), @mDate)) union select '12/05/2014';
I want the calculation to return 11/21 but it's returning 11/28
I can't figure out how to change it to make it be inclusive of a friday :(
enderland feels dumb
 
I'm sure there's an easier way? lol
 
3:07 PM
@RubberDuck ?
> As for the code tree, we can release without it and provide a pre-release version with it. More eyes on may help find any issues with the parser. Thoughts?
I don't understand, the code tree / code explorer is in the master branch and working
 
@enderland I'm you're using modulo and not doing a FizzBuzz, you must be doing something wrong ;-)
 
it's the parser that has issues
 
@Phrancis >.> not helpful! :P
 
I'm thinking about a simpler way, just needed a bit of humor for a crappy Monday morning ;P
 
> I don't think the parser is production-ready - examination of the Code Explorer with complex code reveals some occasional weirdness that will need to be addressed before a release, or be documented as a known issue.
Maybe I misunderstood something.
 
3:12 PM
@enderland Any particular reason you are using @@DATEFIRST?
 
@Phrancis resets the week start date in case people have weird system settintgs
fyi the "union selects" are there for a simple unit test to confirm my date thing
 
@RubberDuck it's less obvious now that I've changed the node tooltip to show the line number, but if you make it display the node type instead, you'll see some methods with a tooltip that says "DoLoopBlockNode" - the parser needs to be fixed, not the Code Explorer ;)
* provided that there are While loops in that method
 
Ahhh, yeah. That's what I don't get. The Code Explorer uses the parser, so how can the code explorer be ready if the parser isn't?
 
well if the parser gets fixed, there's nothing to fix with the Code Explorer
if when
 
@Phrancis hrrm. the mod is the problem. I need it to basically be "mod except return a non-0 return" instead of 0s
 
3:26 PM
@enderland See if this works:
1
A: SQL . The SP or function should calculate the next date for friday

K RichardThis is for SQL Server 2008. To use in 2005, just change the date fields to your preference for datetime to date conversions. It also assumes you are not changing the default week begin value. DECLARE @PassedDate date = '5/21/2011'; SELECT DATEADD(DAY,(CASE DATEPART(DW,@PassedDate) WHEN 7 THEN 6...

 
I think that will. This is going to be a hidious looking query
 
(I didn't think questions were on-topic for SO)
@enderland Anything to do with datetime functions is always hideous. And of course, everything always has to do with datetime functions.
 
no.freaking.kiddding
at least this works
 
@Mat'sMug Right, so by proxy, the Code Explorer isn't ready until the parser is.
So, we create a release where "All these things work." and another where "Hey, the code explorer kinda works, and you can use it, but we know it only kinda works right now."
 
right
 
3:31 PM
> Any non-production releases (alphas, betas, release candidates) can be identified through the pre-release checkbox.
 
interesting
I think it'll work by the end of the week though ;)
 
@all Why does this happen every time I open up a particular Access file?
 
because VBA is harmful!
3
 
... Says the VBA programmer...
 
it's the macro security settings that pop this
 
3:39 PM
Ok... I don't have any macros though, all there is are 2 tables and one Sql query... Annoying
 
there's probably something in the VBA - even an empty module is "harmful"
@RubberDuck perhaps property get/let/set nodes should be "merged" in the Code Explorer tree, too...
 
I just noticed there's a column type for attachments in Access tables... Does that work like a BLOB?
 
@Phrancis does this look like a blob?
Private Function GenerateInsertStatement(ByVal value As FiscalCalendarDate) As String
    Dim result As String
    With value
    result = Framework.Strings.Format("INSERT INTO dwd.FiscalCalendars (_DateInserted,CalendarDate,CalendarDayOfWeek,CalendarDayOfMonth,CalendarDayOfYear,CalendarWeekOfMonth,CalendarWeekOfYear,CalendarMonthOfYear,CalendarYear," & _
                                      "FiscalDayOfWeek,FiscalDayOfMonth,FiscalDayOfQuarter,FiscalDayOfYear,FiscalWeekOfMonth,FiscalWeekOfQuarter,FiscalWeekOfYear,FiscalMonthOfQuarter,FiscalMonthOfYear,FiscalQuarterOfYear,FiscalYear,Holiday
I don't want to imagine what it would look like with plain vanilla VBA string concatenations
@Phrancis probably
 
3:55 PM
user image
2
 
Congrats @vba4all! Enjoy your retirement!
2
 
20K.. my life is meaningless now :p
2
 
@vba4all GRATS!
 
@vba4all Good deal, that really was the best solution.
 
i remember seeing that a few years ago and i saved a .vbs to my repository, all it took was just copy pasting the code and giving credit to the owner
easy rep, really I feel bad :P
 
4:01 PM
@vba4all Congrats!
 
@vba4all Who cares? 20k.....
 
cheers, drinks on me @Mat'sMug @RubberDuck @cheezsteak @Phrancis
5
 
@RubberDuck "I care" (imagine Han Solo voice)
 
@vba4all it's a great solution. If you feel bad then write a class wrapper for it to make usage easier or do something to improve it. But you really shouldn't be feeling bad about it.
 
This is one of the best things ever.
 
4:05 PM
@RubberDuck the latest version has a "Project" column ;)
 
I noticed.
Not sure if I like that or not. The idea was to just see the todos for the project you're working on. Limit the noise.
 
it's consistent with the test and code explorer windows
 
Shouldn't be hard to create a filter though.
 
^^
 
cherry on top of the cake is a phone interview this Friday
 
4:09 PM
.Document.getElementById("nav-badges").nevigate <-- do you see anything wrong with this? — enderland 5 secs ago
 
...^ hopes my boss doesn't see it, hahah
 
@vba4all you must not be in the USA: )
phone interviews are the best though!
 
yeah im in the UK currently
never really had one
always face to face
 
It's probably a prescreening type of thing, basically "are you the person your resume says you are"
 
um.. are you the guy who just scored big this week and finally got 20K rep on SO?
3
are you really the vba4all? the owner of the vba4all.com ?
 
4:11 PM
Going to guess that won't be a question ;)
 
lol
 
wow I didn't even know you could use datepart and datediff functions in VBA
 
@Mat'sMug it's SQL
BUT you can use similar stuff in VBA :)
 
identical
Public Property Get CalendarDate() As Date
    CalendarDate = this.CalendarDate
End Property

Public Property Let CalendarDate(ByVal value As Date)
    this.CalendarDate = value
End Property

Public Property Get CalendarDayOfWeek() As Integer
    CalendarDayOfWeek = DatePart("w", this.CalendarDate)
End Property

Public Property Get CalendarDayOfMonth() As Integer
    CalendarDayOfMonth = DatePart("d", this.CalendarDate)
End Property

Public Property Get CalendarDayOfYear() As Integer
    CalendarDayOfYear = DatePart("y", this.CalendarDate)
well, sort of
@enderland oh... lol, I'm working on a VBA macro to generate an INSERT script for my dwd.FiscalCalendars table
 
4:40 PM
@Mat'sMug I just wrote this for conditional formatting (turns out Access didn't auto update a form name in conditional formatting :( )
> Date()+21-Weekday(Date(),7)=DateAdd("d",7-Weekday(Forms![Tool Design - Manager]![DateEstimatedDesignComplete],7),Forms![Tool Design - Manager]![DateEstimatedDesignComplete])
#easyToReadCode ftw?
 
@Mat'sMug Did you get any good answer to your question on DBA?
 
@Phrancis I did!
Well, I think I did
@enderland I think you can afford to extract a variable, and only access the form once
 
@Mat'sMug it's in conditional formatting though, so... probably not :P
maybe if I wrote a custom func, idk
 
4:55 PM
Oh, nm then
 
Reading about the Procedure/Module/Project/Global scopes right now. Does that type of scoping apply to many programming languages or is that specific to VBA?
 
@Phrancis nearly all
But they are done differently
But on the whole pretty similar
 
OK
 
5:23 PM
Take Global and throw it in your favorite garbage can
It's deprecated, use Public instead
 
What's a real world example where one would want to make a variable Public as opposed to Private? Asking innocently, I understand the idea but can't make it line up with anything concrete...
 
When you need some singleton. aka not very often ;)
You mean in a std module right?
Because for a class module the answer is never
 
I guess I don't know what I mean ;)
 
A public variable in a class module, is an exposed field >> bad OOP
A public variable in a standard module, is like a public static value: accessible from anywhere in the code >> things easily get messy down that road
 
I'm often seeing things in code like public static void main and things like that (I think that's Java)
Is that something different?
 
5:35 PM
void main is special - one, it's a method, and two, it's the entry point
So yeah
And making "static" methods is possible in VBA, but not directly within the IDE (will be possible with the Rubberduck add-in though)
 
Does static mean it doesn't change, like a constant?
 
@Phrancis Generally making variables Public is a good indication you are making a hack/doing something which is going to be difficult to troubleshoot in the future
 
5:51 PM
Copy/pasted code straight from MSDN:
 
Probably makes the same assumption we talked about the other day (that all items in that folder are Contacts)
 
Ah, right
 
6:07 PM
I finally removed that stupid mailing list out of my contacts and guess what? No more bugs!
 
@Phrancis no Static means it can change but isn't destroyed when it leaves scope
 
@Phrancis priceless.
 
Public Function StaticTest(byval i as Integer) as Integer
    Static counter As Integer
    counter = counter + i
    StaticTest = counter
End Function
? StaticTest(1)
1
? StaticTest(2)
3
 
@cheezsteak I see, makes sense.
 
Static is never recommended but is are unavoidable sometimes.
 
6:15 PM
Lots of times you can have a private module-level field instead of a static procedure-level local variable
Note that Static in VBA has a different meaning than in Java or C#
 
Stop confusing the poor guy. It's like Hungarian notation. Yes, there's a right way to do it, but for a beginner( no offense meant @Phrancis) it's easier to just say "Don't do it."
 
lol
 
@Mat'sMug I don't think @Phrancis has done programming other than basic VBA at this point ;)
 
Hahaha :D
"My Excel VB question is not well titled"
 
6:39 PM
0
Q: Generating fiscal calendar dates

Mat's MugI need to generate a T-SQL script for loading data into this table: create table dwd.FiscalCalendars ( _Id int not null identity(1,1) ,_DateInserted datetime not null ,_DateUpdated datetime null ,CalendarDate date not null ,CalendarDayOfWeek int not null ,CalendarDayOfMo...

 
^^ featuring GoSub ;)
 
What?!
GoSub?
 
lol
It's napkin code, pretty much
 
7:02 PM
@Mat'sMug You just want someone to scold you for using GoSub
 
7:15 PM
must... not... feed... trolls...
 
Could be an opportunity for @Phrancis to refactor an subroutine into a function ;)
 
7:30 PM
@Mat'sMug I understand each individual word you just typed, but not arranged in that particular order ;)
 
@enderland trolls on StackExchange?
 
What do you guys think? Doc starting to look good?
I need to go do some real work.
 
@cheezsteak You should try being a mod. lol :)
 
^^ Dafuq does that mean?
 
You're outside of the valid range.
There are 2 elements, but you asked for the third for example.
 
7:50 PM
It did work before I made it fully referenced (not sure why I did, just trying stuff out)
 
@Phrancis determine which method threw the error. It probably is Workbooks("VBA_test") or Worksheets(1).
 
i.e. split that long chain up so you can see which part threw the error.
*with some variables
wb = Workooks("VBA_test")
etc.
 
Private Sub HelloButton_Click()
    Workbooks("VBA_test.xlsm").Worksheets("Sheet1").Range("A1").Value = "Hello, World!"
    MsgBox "Excel says hi!"
End Sub
Is there any point in fully referencing if you are working within one single workbook, for example?
 
00:00 - 20:0020:00 - 00:00

« first day (171 days earlier)      last day (3009 days later) »