Skip to main content
deleted 117 characters in body; edited title
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

VBA Text Class, sort of like .NET?

This is my first post on Code Review and first attempt at writing some reusable OOP code. The problem I'm trying to simplify is the confusing (at least to me) structure of VBA string manipulation.


 
  • Is this approach reasonable from an OOP perspective?
  • Naming things is hard, I don't really like "Text" but couldn't think of anything better. Also, not entirely sure my method and property names are great either
  • Any other gotchas or any other feedback would be awesome

VBA Text Class, sort of like .NET?

This is my first post on Code Review and first attempt at writing some reusable OOP code. The problem I'm trying to simplify is the confusing (at least to me) structure of VBA string manipulation.


 
  • Is this approach reasonable from an OOP perspective?
  • Naming things is hard, I don't really like "Text" but couldn't think of anything better. Also, not entirely sure my method and property names are great either
  • Any other gotchas or any other feedback would be awesome

VBA Text Class, sort of like .NET

This is my first attempt at writing some reusable OOP code. The problem I'm trying to simplify is the confusing (at least to me) structure of VBA string manipulation.

  • Is this approach reasonable from an OOP perspective?
  • Naming things is hard, I don't really like "Text" but couldn't think of anything better. Also, not entirely sure my method and property names are great either
Added detail on how to get the code imported correctly
Source Link
Ryan Wildry
  • 446
  • 3
  • 10

I've been using VBA long enough, that I get it. Read the expression inside out, but with .NET this is much more intuitive (again, to me) with method chaining. So with that in mind I made the following class which sort of have a .NET string quality to them. Be sure to save this Class to a file then import it, as I'm setting the default property of this class to be Value with the Attribute Value.VB_UserMemId = 0 Attribute.

I've been using VBA long enough, that I get it. Read the expression inside out, but with .NET this is much more intuitive (again, to me) with method chaining. So with that in mind I made the following class which sort of have a .NET string quality to them.

I've been using VBA long enough, that I get it. Read the expression inside out, but with .NET this is much more intuitive (again, to me) with method chaining. So with that in mind I made the following class which sort of have a .NET string quality to them. Be sure to save this Class to a file then import it, as I'm setting the default property of this class to be Value with the Attribute Value.VB_UserMemId = 0 Attribute.

deleted 16 characters in body; edited tags
Source Link
200_success
  • 145.7k
  • 22
  • 192
  • 481

Thank you!

Thank you!

Source Link
Ryan Wildry
  • 446
  • 3
  • 10
Loading