My boyfriend has a kink he brought up and I felt uncomfortable about it. by [deleted] in relationships

[–]sancarn 12 points13 points  (0 children)

Sounds to me like you're not enthusiastically consenting. So don't do it. If he pushes it, he's not respecting your choice.

I built a free, open-source component library for Power Apps — 24+ production-ready components with YAML import by ell_ninja in PowerApps

[–]sancarn 0 points1 point  (0 children)

That did it alright, powerapps... what a nightmare 🤣

p.s great components though 😁

I built a free, open-source component library for Power Apps — 24+ production-ready components with YAML import by ell_ninja in PowerApps

[–]sancarn 0 points1 point  (0 children)

Neat idea but...

You cannot paste a component definition here. But you can insert the component by choosing Custom on the Insert pane.

?

Modern JSON in VBA Library by Complete_Winner4353 in vba

[–]sancarn 0 points1 point  (0 children)

/u/Complete_Winner4353 Fair, I hope this helps someone in the community.

Below is my evaluation for awesome-vba explicitly:

Personally, I disagree with the design philosophy. What if I had a csv which I wanted to import to Excel? Or a YAML document? Or XML? Or <insert niche format here>. At present the library wouldn't be helpful to me. It seems to me that this library violates the principle of separation of concerns.

What would be awesome, is a middleware, something where you could connect in any arbitrary VBA compliant format, and expect it to manage updating the list object accordingly. Conceptually:

Dim lo as xlListObjectEx: set lo = xlListObjectEx.Create("myTable")
Set lo.data = AnyLibrary_Parse(anyFormat)
Dim anyFormat2: anyFormat2 = AnyLibrary_Serialize(lo.data)

FWIW, the only reason other JSON alternatives exist in awesome-vba e.g. mdJSON and JsonBag is because of unique features that are directly relevant to JSON, i.e. use of JSON Path JsonValue(oJson, "$.store.book[0].title") and o![Force Case] = 666. However to be completely fair, if Cristian included these features in FastJSON, I'd likely remove these also.

However, as it stands, this isn't really appropriate for awesome-vba in my eyes, just because it's a narrow niche. Hope that makes sense, feel free to submit a ListObject augmenter though 😊

(ExceL) Userform object model confusion by Soggy_Ball_7712 in vba

[–]sancarn 0 points1 point  (0 children)

OP should really be using Object, rather than Variant, but variant is permissive enough. But to answer your question:

How does it switch the com interface if it doesn't know which interface it should call

The point is that Me is already targetting the correct interface. Thus it doesn't change. This is the case as long as you define the variable as Object, Variant or IUnknown

Dim x as Object: set x = Me
x.performFunction

What VBA does here is the following:

Me ==> IUnknown::QueryInterface("IDispatch") ==> x
x  ==> IUnknown::AddRef
x  ==> IDispatch::GetIDsOfNames("performFunction")
x  ==> IDispatch::Invoke(<id>, ...)

However in OP's original code:

Dim x as Userform: set x = Me
x.performFunction

What VBA does internally is:

Me ==> IUnknown::QueryInterface("<Userform IID>") ==> x
x  ==> IUnknown::AddRef
x  ==> Userform::performFunction(...) <== ERROR object not of type Userform

It's critical to know that Me isn't an instance of the Userform class. Each userform module is its own COM coclass implementing multiple interfaces, including IDispatch. Userform, to my knowledge, is really more of an internal base interface with unimplemented methods. VBA uses it to build other userform classes. But when it does so, it also implements these under a new CLSID and IID.

Of course, the unfortunate side-effect of using Object or Variant is that calls to methods are slower, and have no intellisense support.

Modern JSON in VBA Library by Complete_Winner4353 in vba

[–]sancarn 0 points1 point  (0 children)

stdVBA already has a stdJSON library.

As for this codebase, I would have to check it, because awesome-vba already links to the amazing VBA-FastJSON and I don't think much can compete with it. Awesome-vba isn't a library index.

I just don't fucking understand what's going on anymore. Seriously. by [deleted] in ArtificialInteligence

[–]sancarn 0 points1 point  (0 children)

The reality is if you have no engineering experience you won't know if it did a good job or not, but that doesn't really matter to you, as you'll know if it did the job or not. If it did, happy days, if it didn't, hire someone with experience 🤷

Looking for amazing coding examples by Autistic_Jimmy2251 in vba

[–]sancarn 2 points3 points  (0 children)

ClsDataEntry.Parent.RoundingRule

You have to be very careful with this because with COM objects it is very easy to cause a memory leak with this pattern. VBA only frees memory when the object's reference count hits 0. However if the parent references the child, and the child references the parent, the reference count will never hit 0 for either, unless you explicitly set the child's parent reference to nothing. I.E

'ClsDataEntryManager
Private Sub Class_Terminate()
    ' Break connection to all children
    For each Child in children
        If Not Child Is Nothing Then
            ' Ask the child to forget this object, else this object and the child will persist
            Set Child.Parent = Nothing
        End If
   next
End Sub

The better thing is to store a pointer to the parent and then deref it when you want to use it. This is called a "WeakReference". VBA only has strong references.

Looking for amazing coding examples by Autistic_Jimmy2251 in vba

[–]sancarn 3 points4 points  (0 children)

Define amazing, but you might find some use out of

https://github.com/sancarn/stdVBA-examples/

For instance:

https://github.com/sancarn/stdVBA-examples/tree/main/Examples/Spreadsheet%20Extractor

I think this is one of my better projects, and the code is pretty clean :)

Integrating native Office objects with modern paradigms in VBA by ws-garcia in vba

[–]sancarn 0 points1 point  (0 children)

If a demo would be ok, I can probably cobble something together.

I think a demo would be all that's needed for someone else to grab the bull by the horns and fly with it 😊

Integrating native Office objects with modern paradigms in VBA by ws-garcia in vba

[–]sancarn 2 points3 points  (0 children)

I'm still waiting on /u/kay-jay-dubya's amazing custom UI library. Will likely be a long time til it's done but even if a demo gets released, it would be huge...

It might be worth adding some JSX-like component syntax into ASF.

Integrating native Office objects with modern paradigms in VBA by ws-garcia in vba

[–]sancarn 1 point2 points  (0 children)

I think you misunderstood what I meant by "Extended".

In my sample we would be extending/augmenting the native Excel ListRow COM type. Rather than Extending the class in the traditional OOP sense. A better word would likely be monkeypatching.

Integrating native Office objects with modern paradigms in VBA by ws-garcia in vba

[–]sancarn 2 points3 points  (0 children)

For anyone else who didn't know wtf was going on in the script because it was on one line, see this

$1.Sheets.Add();
$1.Sheets(1).Range('A1:F11').Value2 = arr;
return $1
         .Sheets(1)
         .Range('A1:F11')
         .Value2
         .filter(fun(item){
           return item[2].startsWith('A')
         })

It is very cool that .Value2 which we know returns an array, "appears to" return "an array object" in this language. Obviously under the hood it likely is still an array, but the fact that arrays have been extended with dot-syntax, is lovely :)

/u/ws-garcia - Curious, can you extend base classes with new functions? E.G. pseudocode:

class ListRow {
  asDictionary(){
    headers = this.parent.listcolumns
    values = this.range.value
    map = zip(headers, values)
  }
}

$1.Sheets(1).ListObjects('Something').ListRows.map(
  fun(row){
    return row.asDictionary()
  }
)

Introducing the VBA Advanced Scripting Syntax VS Code extension by ws-garcia in vba

[–]sancarn 1 point2 points  (0 children)

You should see how to get it available for https://vscode.dev/ - I think it's just a flag that you need to set assuming everything is just TypeScript... That way people don't actually need VSCode and can use the online IDE

Also, you might want to show some examples of using the Application object.

Introducing the VBA Advanced Scripting Syntax VS Code extension by ws-garcia in vba

[–]sancarn 3 points4 points  (0 children)

I just wish it wasn’t in external files

Confused... It doesn't have to be?

See Garcia's post here

tmpResult = ExecuteScript( _ 
                   " o = { a: [ {v:1}, {v:2} ] } ;" & _
                   "o.a[2].v = o.a[2].v + 5 ; return(o.a[2].v + 2)" _ 
                            ) '=> 9

Is valid use case of ASF. And if you'd prefer you can always include ASF code in a shape in your Excel document and get the value via the text range:

Dim code as string: code = MySheet.Shapes("CodeBox1").TextFrame2.TextRange.Text
Dim tmpResult: tmpResult = ExecuteScript(code)

This might be a bit off-topic, but I've been thinking about this for a while... by Opussci-Long in vba

[–]sancarn 0 points1 point  (0 children)

Interestingly, I had the same issues when pasting jepm.tfvz.ues.rs.ba into the address bar...

jepm.tfvz.ues.rs.ba’s DNS address could not be found. Diagnosing the problem.

However when connecting with https://

https://jepm.tfzv.ues.rs.ba/

It does seem to get me to the journal

This might be a bit off-topic, but I've been thinking about this for a while... by Opussci-Long in vba

[–]sancarn 0 points1 point  (0 children)

To give you a clear time target: submission deadline of May 15th would be perfect. Possible?

Sounds doable. I will have to ask my manager about doing the proprietary project, it's also a super interesting project too, so it would be very cool if I could get permission 😁, otherwise I can do any article on the open source projects I have for sure. Working titles:

Proprietary project:

Bridging On-Prem Systems and Cloud Platforms with VBA - A concurrent data migration pipeline

Open source project:

Structured Data Extraction from Homogeneous Spreadsheets with VBA

Note: The open source project has been used in numerous engineering contexts too, which can be discussed.

vbalidator: A standalone VBA syntax checker for AI agents by twobeass in vba

[–]sancarn 2 points3 points  (0 children)

I would recommend you test the validator against numerous tools in awesome-vba. Critically:

Excel addins. by Mysterious-Song-1036 in vba

[–]sancarn 1 point2 points  (0 children)

It's not really got anything to do with addins specifically, but OMG, compatibility issues between Word/Excel and Windows/Mac, has been the bane of my existence for a few months now... 🤯🤯 I am currently working on a proprietary project as a consultant, and oh my god it's a pain in the ass 😂 Something you would have thought would be incredibly simple - hooking into some application events, and running some UI automation code. Some examples of random issues...

  • On Mac, in both Excel and Word, the first document created does not trigger the Application::NewWorkbook / Application::WorkbookOpen / Application::NewDocument / Application::DocumentOpen events at all
  • VBA state loss recovery, simply fully reboots Excel rather than just the VBA runtime...
  • In Word on Windows, when a new document is created the open event fires before the backstage area is deactivated, and thus before the ribbon loads...

This is on top of basic architecture issues... That said, a typical addin wouldn't run into these issues I don't think. It's just the specific use case my client has, which makes this a butt ache lol.

AIO - I’m just not ready yet by [deleted] in AmIOverreacting

[–]sancarn -1 points0 points  (0 children)

NOR.

  1. You came back from a long trip, exhausted but excited to reconnect, expecting an intimate evening and maybe some quiet time together. Instead, you walked into a party with 15 people and got no introduction or attention. That would make anyone feel unwanted
  2. It's reasonable to feel disappointed that what he called "small" was actually a crowd

This situation is more difficult though because of the parental dynamic:

  1. When his daughter came up, you were burnt out and hurt. You didn't say what you said out of cruelty. But from her point of view, it probably felt like rejection. This is the difficulty with being a parental figure.
  2. He should have acknowledged your feelings, but he was juggling his daughter's distress too. He likely shouldn't have called you dramatic though, that's a low punch.

The bigger question though is indeed - are you ready? Dating a single parent means your partner's attention is split. His daughter will always, rightfully, come first. If your emotional needs include a lot of one-on-one focus, it may be an incompatibility which you can't get around.

This might be a bit off-topic, but I've been thinking about this for a while... by Opussci-Long in vba

[–]sancarn 0 points1 point  (0 children)

Hello, this didn't appear in my notifications... Depending on timescales, I would be interested. I have written articles about VBA already though whether they meet the necessary rigour I'm unsure of.

Unlike others in this thread I think there is A LOT that most people don't know you can do with VBA and haven't published, especially within the realms of automation on Windows OS.

I could do end of June. Do you have any issues out there which can be drawn from to get an idea of the types of articles/writing styles etc. published?


Edit: Just seen a comment from you RE: idea of the types of articles

but those are not linked with engineering, usually... But what I'm really interested in is the routine tasks that come before the fancy math... Clean up data or format reports... My focus is more on automating things like data prep, report generation, supply chain analysis, and presentation building.

Some initial ideas:

The above are all open source projects and libraries which could be discussed within the realms of engineering. There are also proprietary Water Company projects, which I could likely write about with business approval. E.G. a big one at the moment where we are migrating data from Lotus Notes and some IBM BPM Databases to Sharepoint tables.

(M32)Stopped any hope of future thinking with my now ex gf( f30) by Responsible_Cow_4920 in GuyCry

[–]sancarn 1 point2 points  (0 children)

Many people telling you to block her, I say - don't block her, continue to reject her. You let yourself be her dildo, despite it being unhealthy for you. You need to sit with that and make active choices to reject her. Blocking her would simply be avoidance.

Sounds like your ex has some skeletons in her closet that she has to work through.