Skills and Automation
Skills and Automation
  • 64
  • 143 979
User Defined Types || Excel VBA Master Class || 3.4f
User Defined Types or UDTs, allow us to use a bunch of variables together as a single set. This improves code readability and open ups many more possibilities, such as those listed below.
- We can pass the UDT variable as an argument into a Function.
- We can even return multiple values from a Function, using a UDT.
- UDTs are more lightweight than using a Class. However, unlike a Class, they can’t contain methods.
- UDTs can be used within Arrays, but not within Dictionaries and Collections.
If the objective is simply to use a bunch of variables as a single group, choose UDT over a Class.
#vba #excel
Follow the rest of the series, in the below playlist:
th-cam.com/play/PLgG3u13JJuEbguNAl0zbkq3mDCvy07v0Y.html
Code snippets can be found here:
skillsandautomation.com/master-class/user-defined-types-excel-vba-master-class/
00:00 Intro
02:04 Basics
02:42 Create UDTs
09:07 Nesting UDTs
12:40 Pass UDT as an Argument
17:55 Return UDTs via Function
24:05 Using Objects within UDTs
28:47 Declare Arrays as UDTs
มุมมอง: 257

วีดีโอ

Working with Dates || Excel VBA Master Class || 3.4e
มุมมอง 2372 หลายเดือนก่อน
Dates are tricky to deal with in VBA. In this video, we will deep dive into the date data type and look at ways to manipulate dates accurately using various functions. In this lesson, we will cover a lot of examples that we will help us: - Find the current date and time using Date(), Now(), Time() - Extract date component from a datetime value using DateValue() - Construct a date using time int...
Working with Strings || Excel VBA Master Class || 3.4d
มุมมอง 2622 หลายเดือนก่อน
Strings are fun to manipulate and VBA provides us with many tools such as Functions and Operators to slice and dice and shape text data any way we want. In this long lesson, we will cover a lot of examples that we will help us: - Insert Characters using Chr() - Determine Length of a string using Len() - Check whether a string is blank or not - Join strings using & and operators - Extract parts ...
Working with Booleans || Excel VBA Master Class || 3.4c
มุมมอง 1192 หลายเดือนก่อน
We encounter Boolean values throughout VBA, either as output of evaluation of expressions or return values of functions or values that we assign to variables. In this informative lesson, we will look at how to interact with the Boolean values True and False. Then, we will walk through the logic of a simple data entry form and check out how Boolean logic can be used to perform validation checks ...
Working with Numbers || Excel VBA Master Class || 3.4b
มุมมอง 1462 หลายเดือนก่อน
Working with Numerical Types can be daunting since there our a lot of options to choose from. We will discuss which option to use when and how to make that decision easy. We will also, look at how to validate whether a value is numerical or not, and how to perform operations such as Addition in VBA. In this short lesson, we will look at the functions to evaluate numerical values such as isNumer...
Intro to Data Types || Excel VBA Master Class || 3.4a
มุมมอง 1712 หลายเดือนก่อน
Data Types are a fundamental concept of programming. Understanding data types is important to maintain the integrity of data that we intend to manipulate via our VBA code. In this introductory lesson, - we will start with an overview of the Data Types that are available for us to use within VBA. - Then, we will disambiguate the terms Variable, Data Types, Values and Literals. - We will learn ho...
Early and Late Binding (Object Variables) || Excel VBA Master Class || 3.3b
มุมมอง 2353 หลายเดือนก่อน
The concept of binding objects to variables is important to know especially, when accessing external applications such as PowerPoint and Outlook. Early Binding is when we declare objects using a specific Object type. Late Binding is when we declare objects using a generic Object type. In this lesson, we will learn: - How to differentiate Early Binding from Late Binding - How to access external ...
Object Variables || Excel VBA Master Class || 3.3
มุมมอง 3283 หลายเดือนก่อน
Use Object Variables instead of repeating the same object reference over and over again in our code. Object Variables make our objects portable and make our code more manageable. We can use Object Variables to: - Refer to Existing Objects - Refer to New Worksheets - Refer to New or Existing Workbooks - Refer to Newly Created Objects Always use separate Dim and Set Keywords to create object vari...
Constants & Enumerations || Excel VBA Master Class || 3.2
มุมมอง 5333 หลายเดือนก่อน
Use Constants in place of raw, fixed values within the VBA code. Creating and using a Constant roughly follows the same pattern as a Variable, with a few key differences. We will learn more within this video. There are system defined constants and user defined constants. We will start with browsing system defined or intrinsic constants within the Object Browser. Then, we will check out how to c...
Variables || Excel VBA Master Class || 3.1
มุมมอง 2563 หลายเดือนก่อน
Start learning the components of the VBA programming language with an introduction to variables. Variables make our code more readable and at times, more efficient. We will start with a practical introduction to variables. We will discuss a scenario involving data variables, constants and object variables. Rest of the lesson will focus on data variables. Then, we will learn how to create variab...
Object Browser & Library || Excel VBA Master Class || 2.4
มุมมอง 4126 หลายเดือนก่อน
Learn the architecture behind the Excel Object Model. The Object Library enables access to few libraries by default, including the Excel Object Library. And this library allows us to interact with the components in Excel. We can even, interact with other Applications such as Outlook. We will learn to send an Outlook Email via Excel VBA. And, let's check out how to navigate the Excel Object Libr...
Object Properties and Methods || Excel VBA Master Class || 2.3
มุมมอง 3406 หลายเดือนก่อน
Once we are able to Identify (or Reference) an Object in VBA, we are free to manipulate it by changing its characteristics (properties) or performing some action with it (methods). We will explore both these aspects in this video. We will also, cover how to manipulate multiple properties and/or methods for the same object using With Statements. #vba #excel Follow the rest of the series, in the ...
Working with the Object Hierarchy || Excel VBA Master Class || 2.2
มุมมอง 4776 หลายเดือนก่อน
Deep-dive into using the Excel Object Model to locate which Object we want to manipulate. In this video, we will start by learning the formal way to reference any Object (using the Fully Qualified Reference). And then, we will look at shortcuts to reference the same object. These shortcuts include using the Global Object members such as: - ThisWorkbook - Active Objects - Using Workbooks, Worksh...
Intro to Excel Objects (Theory Only) || Excel VBA Master Class || 2.1
มุมมอง 2596 หลายเดือนก่อน
The goal for automation through Excel VBA is to manipulate the various components of Excel. These components are called Objects, which are stacked within the Excel Object Model. In this video, we will learn what Objects are and how to use them. Topics covered in this lesson are: - Objects in Real Life Context - Objects in Excel VBA Context And we will cover the following key points: - Excel Obj...
Saving Macros Files, Trust Center Settings, Locking Projects || Excel VBA Master Class || 1.6
มุมมอง 2596 หลายเดือนก่อน
What is the extension for saving a macro file? What are the settings for disabling macros when opening a Excel Macro file? Can we lock the macro code so that no one else can access it? We will answer all these questions in this video. Topics covered in this lesson are: Saving: - Using .xlsm and .xlsb file extensions. - Using Personal Macro Workbooks - Brief use case for Add Ins. Security: - Mac...
Assign Macro to a Button || Excel VBA Master Class || 1.5
มุมมอง 2826 หลายเดือนก่อน
Assign Macro to a Button || Excel VBA Master Class || 1.5
Developer Tab (Overview) || Excel VBA Master Class || 1.4
มุมมอง 1316 หลายเดือนก่อน
Developer Tab (Overview) || Excel VBA Master Class || 1.4
Customize the VB Editor || Excel VBA Master Class || 1.3.3
มุมมอง 2416 หลายเดือนก่อน
Customize the VB Editor || Excel VBA Master Class || 1.3.3
Learn to Write VBA Code || Excel VBA Master Class || 1.3.2
มุมมอง 3407 หลายเดือนก่อน
Learn to Write VBA Code || Excel VBA Master Class || 1.3.2
Navigate the VB Editor || Excel VBA Master Class || 1.3.1
มุมมอง 2247 หลายเดือนก่อน
Navigate the VB Editor || Excel VBA Master Class || 1.3.1
Record Macros || Excel VBA Master Class || 1.2
มุมมอง 2847 หลายเดือนก่อน
Record Macros || Excel VBA Master Class || 1.2
Build your first macro || Excel VBA Master Class || 1.1
มุมมอง 5007 หลายเดือนก่อน
Build your first macro || Excel VBA Master Class || 1.1
Excel VBA || Calling Subs and Functions || Parent - Child Architecture || Make your code smarter
มุมมอง 4688 หลายเดือนก่อน
Excel VBA || Calling Subs and Functions || Parent - Child Architecture || Make your code smarter
Excel VBA | Create a PowerPoint Slide Deck With Dynamic Commentary | USEFUL for Corporate Reporting
มุมมอง 2.9K8 หลายเดือนก่อน
Excel VBA | Create a PowerPoint Slide Deck With Dynamic Commentary | USEFUL for Corporate Reporting
VBA Automation Project || Build a Worksheet to Control the Flow of a Macro || Lots of Tips & Tricks
มุมมอง 1.3K9 หลายเดือนก่อน
VBA Automation Project || Build a Worksheet to Control the Flow of a Macro || Lots of Tips & Tricks
Excel VBA Automation Project | Send Reports and Reconcile Responses | 2-Step Workflow
มุมมอง 83310 หลายเดือนก่อน
Excel VBA Automation Project | Send Reports and Reconcile Responses | 2-Step Workflow
Excel VBA | Lock & Unlock Excel Files, Sheets & Specific Areas within a Sheet | Basic Functionality
มุมมอง 33310 หลายเดือนก่อน
Excel VBA | Lock & Unlock Excel Files, Sheets & Specific Areas within a Sheet | Basic Functionality
A Practical Introduction to Using FIND Function in Excel VBA || Perform any kind of Lookups
มุมมอง 82410 หลายเดือนก่อน
A Practical Introduction to Using FIND Function in Excel VBA || Perform any kind of Lookups
Excel VBA || Transfer Dictionaries and Arrays through Functions || Make your code more manageable!
มุมมอง 1.1K11 หลายเดือนก่อน
Excel VBA || Transfer Dictionaries and Arrays through Functions || Make your code more manageable!
Excel VBA || Select Data Range Except for Top Row || Range - CurrentRegion, Offset and Resize
มุมมอง 89211 หลายเดือนก่อน
Excel VBA || Select Data Range Except for Top Row || Range - CurrentRegion, Offset and Resize

ความคิดเห็น

  • @silverclouds3725
    @silverclouds3725 14 วันที่ผ่านมา

    This is good stuff!!

  • @kartickchakraborty9135
    @kartickchakraborty9135 25 วันที่ผ่านมา

    Sir, is there any way to apply Strings.Filter method in 2 dimensional array in Excel VBA? I want to filter array on single or multiple conditions. Or, you can say, I want to store data into The Final Array (ActionFilmDetails) that meet the Condition (Single or Multiple). I've written the below-mentioned code. But, I can't understand, why this code gives me "Run-time Error'13': Type Mismatch" Error? Raw Data: ID Title Released Date Length Genre 001 Marvel's The Avengers 04-May-12 143 Action 002 The Dark Knight Rises 20-Jul-12 165 Action 003 The Hunger Games 23-Mar-12 142 Adventure 004 Skyfall 09-Nov-12 143 Action 005 The Hobbit: An Unexpected Journey 14-Dec-12 169 Fantasy 006 The Twilight Saga: Breaking Dawn Part 2 16-Nov-12 116 Awful 007 The Amazing Spider-Man 03-Jul-12 136 Action ============================ Code: Option Explicit Sub CopyActionFilmsOnly() ThisWorkbook.Save Sheet3.Range("G1").CurrentRegion.Offset(RowOffset:=1, ColumnOffset:=0).ClearContents Dim LastRow As Long LastRow = Sheet3.Range("A1").Offset(RowOffset:=0, ColumnOffset:=1).End(xlDown).Row Dim LastColumn As Long LastColumn = Sheet3.Range("A1").End(xlToRight).Column Dim FilmDetails As Variant FilmDetails = Sheet3.Range("A1").Offset(RowOffset:=1, ColumnOffset:=0).Resize(RowSize:=LastRow - 1, ColumnSize:=LastColumn) Dim RowCounter As Long Dim ColumnCounter As Long Dim ActionFilmDetails As Variant For RowCounter = LBound(FilmDetails, 1) To UBound(FilmDetails, 1) For ColumnCounter = LBound(FilmDetails, 2) To UBound(FilmDetails, 2) If FilmDetails(RowCounter, 5) = "Action" Then ActionFilmDetails(RowCounter, ColumnCounter) = FilmDetails(RowCounter, ColumnCounter) Else Rem Nothing is needed to do End If Next ColumnCounter Next RowCounter End Sub

  • @dinkarshinde3728
    @dinkarshinde3728 27 วันที่ผ่านมา

    Very nice

  • @AlakhGoel
    @AlakhGoel หลายเดือนก่อน

    Could you please add some videos on the Macbook file dialog functions? thank you in advance

  • @reyansh304
    @reyansh304 หลายเดือนก่อน

    Thanks

  • @SkillsandAutomation
    @SkillsandAutomation 2 หลายเดือนก่อน

    Edit: At 1:57, I mention String is a Primitive Data Type. This is not entirely correct in VBA. A String is a LIST of individual characters which makes it a Composite Data Type. But, then again, we can't declare a Variable as a Character in VBA. So, the exact classification of a String in VBA is a bit murky. In other languages, String is clearly NOT a primitive data type. I talk more this in the lesson on Strings.

  • @brayanmoreno240
    @brayanmoreno240 2 หลายเดือนก่อน

    The best videos always ❤

  • @kebincui
    @kebincui 2 หลายเดือนก่อน

    Excellent ❤, keep up this good work

  • @umesh6600
    @umesh6600 2 หลายเดือนก่อน

    every one like video

  • @umesh6600
    @umesh6600 2 หลายเดือนก่อน

    thank you for continuing series

  • @sakhilengwenya594
    @sakhilengwenya594 2 หลายเดือนก่อน

    Please do a tutorial on how to automate a cashflow statement monthly using the income statement and balance sheet.

    • @SkillsandAutomation
      @SkillsandAutomation 2 หลายเดือนก่อน

      Hi, Thanks for the suggestion. I am currently, focused on completing chapter 3 in the VBA master class series. Once that's done, I will pick up your suggestion and do some accounting related examples. Cheers

  • @sakhilengwenya594
    @sakhilengwenya594 2 หลายเดือนก่อน

    My favourite channel

  • @peterwooldridge7285
    @peterwooldridge7285 2 หลายเดือนก่อน

    Yet another great tutorial...I'd be a happy student if you were my tutor. Look forward to the next one😂

  • @henrikijonkoping4694
    @henrikijonkoping4694 2 หลายเดือนก่อน

    thank you! very useful

  • @fliptop157
    @fliptop157 2 หลายเดือนก่อน

    Great compositional breakdown to the nucleus of objects.

  • @Dexter101x
    @Dexter101x 2 หลายเดือนก่อน

    I wish people would stop pronouncing "Parameters" as para-meters. Its pronounced "param-meters". A double m is silent....grrrrr

    • @SkillsandAutomation
      @SkillsandAutomation 2 หลายเดือนก่อน

      thanks for the feedback. i will make a note to pronounce it correctly.

  • @kebincui
    @kebincui 2 หลายเดือนก่อน

    Excellent video. Thanks for sharing and keep up this excellent work❤👍

  • @sakhilengwenya594
    @sakhilengwenya594 2 หลายเดือนก่อน

    Please do mapping for a cash flow statement example using trail balances

  • @chaitanyajoshi690
    @chaitanyajoshi690 3 หลายเดือนก่อน

    Hi, Pl guide. In the 2nd line in 'Else' section of 'If' statement for creating Storename Array, Redim is used without 'Preserve'. However, the array doesn't loose values assigned thru 'If' condition in previous iteration. Kindly guide how. Pl. advise if I am missing something to understand.

    • @SkillsandAutomation
      @SkillsandAutomation 3 หลายเดือนก่อน

      Hi, I will suggest that you refer to the screenshot at 04:35, steps 1,2 & 3. When we use Redim without Preserve after the Else statement, we are creating a brand new array. We are re-using the same array name, but its got nothing to do with the array from the previous iteration. After the Redim statement, we assign the dictionary item to this new array that we have created. At this point, it becomes the same array as the previous iteration for that region key. And now, we are ready to add a new Store to it and assign it back to the dictionary item. Hope that helps.

    • @chaitanyajoshi690
      @chaitanyajoshi690 3 หลายเดือนก่อน

      Ok..... Now I get it..... Thanks a lot for the guidance. The contents of your videos are definitely useful and helpful. Best Regards...

  • @georgemathew860
    @georgemathew860 3 หลายเดือนก่อน

    thank u bro, nice tutorial

  • @georgemathew860
    @georgemathew860 3 หลายเดือนก่อน

    good explanation of the project in perfect way able to understand the vba coding thank u bro

  • @georgemathew860
    @georgemathew860 3 หลายเดือนก่อน

    Nice tutorial

  • @umesh6600
    @umesh6600 3 หลายเดือนก่อน

    thanks for video and your work and please keep posting video

  • @johnedpraisy9016
    @johnedpraisy9016 3 หลายเดือนก่อน

    My Code is not implementing in project.

  • @3170ccp
    @3170ccp 3 หลายเดือนก่อน

    Excellent, can share source code?

    • @SkillsandAutomation
      @SkillsandAutomation 3 หลายเดือนก่อน

      Hi, Links to the source code can now be found in the video description. Cheers

  • @kebincui
    @kebincui 3 หลายเดือนก่อน

    Excellent video. Thanks for sharing

  • @kebincui
    @kebincui 3 หลายเดือนก่อน

    👍❤

  • @kebincui
    @kebincui 3 หลายเดือนก่อน

    Excellent. 👍Thanks

  • @peterwooldridge7285
    @peterwooldridge7285 3 หลายเดือนก่อน

    Another good one...some good teaching skills demonstrated here

  • @morenabalatseng8003
    @morenabalatseng8003 3 หลายเดือนก่อน

    Thank you for this playlist

  • @peterwooldridge7285
    @peterwooldridge7285 3 หลายเดือนก่อน

    Another excellent tut

  • @umesh6600
    @umesh6600 3 หลายเดือนก่อน

    thanks sir ji for video, please keep continue VBA master class

  • @Munichandra_Reddy
    @Munichandra_Reddy 3 หลายเดือนก่อน

    Hi there, If you possible , could You explain really time database related project using macro code Because I asked lots of questions of people no has not been answered

  • @sakhilengwenya594
    @sakhilengwenya594 4 หลายเดือนก่อน

    Please post weekly. I love this channel, extremely informative examples

  • @coding7241
    @coding7241 4 หลายเดือนก่อน

    ur a great teacher....iam lucky that finnaly i found this playlist......before i directly went to the projects playlist ..now i am here for basics then i will go there: note : i read a saw 10 basics videos already from some other channel in hindi ... now this is my second prepration

  • @coding7241
    @coding7241 4 หลายเดือนก่อน

    these projects are pro level projects

  • @sakhilengwenya594
    @sakhilengwenya594 4 หลายเดือนก่อน

    Please do more examples

  • @jerzykepinski
    @jerzykepinski 4 หลายเดือนก่อน

    this is good stuff.

  • @npam1559
    @npam1559 5 หลายเดือนก่อน

    Sir i need your help for create a cutting optimization program.

  • @pernicious92
    @pernicious92 5 หลายเดือนก่อน

    Thanks for the Video. It was very helpful. Just as an fyi, you forgot a line in the first script. oAttach.SaveAsFile sAttachName

  • @sakhilengwenya594
    @sakhilengwenya594 5 หลายเดือนก่อน

    This is like art, nice

  • @raymondcowan7017
    @raymondcowan7017 5 หลายเดือนก่อน

    Superb work that is of great help. Just having a run time 13 error when some of the item IDs are numbers and some are alphanumeric e.g. L7878. Any idea where I change the data type?

  • @mar25947
    @mar25947 5 หลายเดือนก่อน

    Brilliant, thank you!!

  • @coding7241
    @coding7241 5 หลายเดือนก่อน

    this is the best video i have ever found .....the only thing i regeret iti found this video in 2024 means after 3 long years..........thank you for making such valuabe video ...thankyou

  • @sakhilengwenya594
    @sakhilengwenya594 5 หลายเดือนก่อน

    Please post more accounting content

  • @sakhilengwenya594
    @sakhilengwenya594 5 หลายเดือนก่อน

    I found this case study extremely useful, very comprehensive and complex. Please post more case studies accounting and finance related

  • @chitaranjanbarik8787
    @chitaranjanbarik8787 5 หลายเดือนก่อน

    Superbly talented sir, simple with zero level 100.

  • @ThabangTsotetsi-ll5wb
    @ThabangTsotetsi-ll5wb 6 หลายเดือนก่อน

    hello , I tried to add the wsOut.Cells.Clear into my code but it says"The Varible is not defined" what might be the poblem?

    • @SkillsandAutomation
      @SkillsandAutomation 6 หลายเดือนก่อน

      Hi, This code uses the Worksheet Code Name e.g. wsOut. If your code names don't match as per the video, the code will not run for you. I briefly mention the code name setup at the 04:29 mark. Cheers

  • @umesh6600
    @umesh6600 6 หลายเดือนก่อน

    thankyou sir ji for your effort teaching

  • @kasondekasondel2885
    @kasondekasondel2885 6 หลายเดือนก่อน

    thank you sir from Zimbabwe