Macro workaround for transferring tags between databases

Support for the Ignition, Bovada and Bodog Hand Grabber

Moderator: WhiteRider

Macro workaround for transferring tags between databases

Postby mythrilfox » Sun Jan 31, 2021 9:37 pm

hey all, I was looking for a way to transfer tags between databases so I could go over tagged hands later in my hole-cards-revealed database. this isn't quite that, but I came up with a spreadsheet macro workaround that's almost as good and only takes a couple of seconds. thought I'd share the idea here in case anyone else could use it.

basically you bring up the tagged hands in your main database, run "Export Report", and then run the macro on the report. the macro creates an expression filter that filters for all of the hands you have listed. switch to the hole cards DB, apply the expression, and voila.

Code: Select all
Sub HandFilter()

Dim Doc As Object
dim Cell as object
dim i as integer
dim filter as string
dim Sheet as object

Doc = ThisComponent
Sheet = Doc.CurrentController.ActiveSheet

Cell = Sheet.getCellByPosition(0,1)
filter = "#Hand ## = '" & Cell.String & "'"

i = 2
Cell = Sheet.getCellByPosition(0,i)

while Cell.Type <> com.sun.star.table.CellContentType.EMPTY
   filter = filter & " OR #Hand ## = '" & Cell.String & "'"
    i = i+1
    Cell = Sheet.getCellByPosition(0,i)
wend

Cell = Sheet.getCellByPosition(0,i+1)
Cell.String = filter
Doc.CurrentController.select(Cell)

End Sub


this is for Libreoffice Calc, but I'm sure it could be modded for Excel pretty easily. hth!
mythrilfox
 
Posts: 12
Joined: Tue Aug 19, 2008 6:48 pm

Return to Ignition, Bovada, Bodog Hand Grabber

Who is online

Users browsing this forum: No registered users and 2 guests

cron
highfalutin