Skip to main content

Questions tagged [vba]

Filter by
Sorted by
Tagged with
1 vote
4 answers
260 views

I'm a mechanical engineer who works at a design build construction firm, and I've taught myself a lot more about coding and good programming practices since I started working just to automate some ...
nateAtwork's user avatar
0 votes
0 answers
141 views

I'm working on an Excel tool that needs to synchronize with a CRM via its API. The CRM's API authentication process involves logging in with a username and password, after which a session key is ...
Alon Cohen's user avatar
-1 votes
2 answers
419 views

In an engineering company, there are many engineers that edit in Excel/VBA Spreadsheets to perform some engineering calculations.They all do more or less similar things: calculate, manage engineering ...
serge's user avatar
  • 115
-2 votes
1 answer
134 views

I am new to VBA and am struggling with overall program design: Toy Example Input: Spreadsheet with 20000 rows and 50 columns. Also, order of rows matters. Task: Create 3 different reports on a new ...
OnMyCount's user avatar
4 votes
1 answer
352 views

I run on a daily basis a set of VBA-rich Excel files. Most of them include MS Office application cross-talk, but also employ third-party applications and MySQL. Due to the fact of running those files ...
Oskar_U's user avatar
  • 151
2 votes
4 answers
584 views

I would like to get your code thought and views on using conditional vs logical testing. For example: To test the conditions of truthness of all of the following variables, their currect status is ...
Mohsen Alyafei's user avatar
1 vote
1 answer
260 views

Background I am currently building this project with VBA, just to keep in the back of your mind when thinking about my question. Imagine 2 adjacent blocks, in Excel. The first block is made up of ...
Ekko's user avatar
  • 27
-2 votes
1 answer
93 views

I need to fill a Products table in file A with their manufacturing costs that are in another Costs table in file B. Currently, I read Products and Costs tables into their respective arrays and for ...
Ruby Harris's user avatar
0 votes
1 answer
272 views

I have two lists: 1: 1) A abc 2) A def 3) A ghi 4) B jkl 5) B mno 6) C fzy 7) C xxa 2: 1) vsf 2) jkl 3) fzy 4) xxa 5) xyz 6) mno 7) def 8) abc I am trying to match each of the continuous sequences ...
sigil's user avatar
  • 363
2 votes
1 answer
487 views

having a bit of trouble getting started with this problem, and not much luck googling solutions. I can't use MS Project to display gantt charts, so am wanting to use VBA to draw a pretty gantt chart ...
Simon's user avatar
  • 155
5 votes
1 answer
2k views

I've noticed that some languages like C, C++, Java, Perl, and .NET Visual Basic have "block" scoping which means that a variable will only be defined within the specific code block it was declared in. ...
tjwrona's user avatar
  • 269
2 votes
2 answers
4k views

I'm a heavy VBA user that when has the chance to do a little project in python it's like going from hell to haven when it comes to programming itself. Still, I know that my users want reports in excel ...
BuckTurgidson's user avatar
3 votes
1 answer
1k views

I have the following structure in my Outlook Public Folders. -Public Folders --1001_RandomProject --1002_AnotherProject --1003_Yetanotherproject ... and so on, basically there's a couple of thousand(!...
Sam's user avatar
  • 143
9 votes
5 answers
934 views

The MSDN page on ByRef and ByVal keywords isn't very helpful; unless I somehow skipped it, they're simply being referred to as "keywords" everywhere. One of the main contributors of the Rubberduck ...
Mathieu Guindon's user avatar
2 votes
1 answer
540 views

I'm under the impression that an object MUST support all methods/properties upon being initialized or else the program will create an error. However, if you see below I am defining 2 variables (doc ...
apdm's user avatar
  • 121
3 votes
2 answers
3k views

I have two versions of an "Excel-Tool", i.e. a spreadsheet with a lot of vba code. Lets say, this tool is used to monitor two facilities. Both facilities differ in minor aspects. That means, I have ...
Oliver's user avatar
  • 143
8 votes
6 answers
2k views

How can I write functions that are reusable without sacrificing performance? I am repeatedly coming up against the situation where I want to write a function in a way that makes it reusable (e.g. it ...
Caltor's user avatar
  • 189
1 vote
2 answers
868 views

I would like to know what the pros and cons are for storing a range variable instead of four integers or long variables (representing the first and last row and column) to define that range. One ...
nateAtwork's user avatar
19 votes
7 answers
11k views

Background Last year, I was asked to create a tool to be used for business planning for around 10 users. This was done on behalf of another IT team who "sub-contracted" the work to me, and due to the ...
i_saw_drones's user avatar
2 votes
1 answer
1k views

I'm setting up a data validator that will iterate through the rows of a spreadsheet, and for each column, perform a validation check. I was thinking that this might be an appropriate task for the ...
sigil's user avatar
  • 363
1 vote
0 answers
5k views

I'm sure this is probably out there but I can't seem to find it. Updates I have tested some different code, and reduced my time to complete the task from 50/60 seconds to 10 seconds. This is what I ...
Matt's user avatar
  • 191
-3 votes
1 answer
644 views

Is there a way to automate running VBA in Excel to clean up the file from inside an application? Everyday my office has to confirm that 50 people have shown up for work on time. The scheduling ...
Fadebent's user avatar
3 votes
1 answer
451 views

I am attempting to encapsulate several features about a user in a single class. Although the main use for this class would be to initialize it once and never have to call set any variables again, I ...
Elias's user avatar
  • 203
14 votes
4 answers
11k views

I know that it's possible to call .NET code from your VBA code, but why does VBA continue to exist? The only reason I can think about is legacy. I just had to sort a Scripting.Dictionary and the ...
Kiril's user avatar
  • 529
8 votes
2 answers
3k views

When I set a variable to an object in VBA / VBScript, I always need to prefix the statement with "Set" such as: Set Dict = CreateObject("Scripting.Dictionary") If I set a variable to a primitive or ...
neelsg's user avatar
  • 483
3 votes
1 answer
4k views

This was posted originally at StackOverflow though suggested to post here instead. I am looking to create an Excel VBA solution that will create a rota/schedule allocating staff to service users ...
mhep's user avatar
  • 245
11 votes
1 answer
940 views

Intrigued by Flow Based Programming a la J Paul Morrison. I wonder if one can implement FBP in Excel/VBA. I searched quite a bit for a Basic-Lang FBP implementation to no avail. I've looked at some ...
klausnrooster's user avatar
2 votes
1 answer
323 views

Context: I'm working on a fairly large Access database (which I inherited) that has its interface and tables separated. In order to make this work together, we have a lot of SQL queries (dozens). ...
ApplePie's user avatar
  • 429
-1 votes
3 answers
337 views

As a fresh programmer, one of the first thing for me to learn was to learn language and its syntax. Now my next training issue is to design my code heirarchy in such a way it is simple to maintain ...
nebffa's user avatar
  • 129