Fixing a custom filter

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
gibsongk55
Posts: 43
Joined: Sun Nov 30, 2008 12:44 am

Fixing a custom filter

Post by gibsongk55 »

Hi,

I had someone create a custom filter with two dropdowns using criteria form a worksheet tab and macros. I recently had to had a new column, delete 2 columns then i added two more a few over to compensate for the same number of columns. Obviously that screwed it up and now the filter won't work. I copied the criteria worksheet to notepad before and after code. Then the same with the VB macros to two files. Then compared them with winmerge and they are all identical. Any idea to where i can find the problem to fix it?

Thanks for any input.


Gibs
OOo 4.1.X on MS Windows 7 UltimateX64, Open Office Calc
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: fixing a custom filter

Post by Villeroy »

You are the one and only developer of your application. We have no clue what you are trying to do with that procedure.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Zizi64
Volunteer
Posts: 11363
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: fixing a custom filter

Post by Zizi64 »

VB macros
Are you using the Excel?
Or are those macros some StarBasic+API macros?
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
gibsongk55
Posts: 43
Joined: Sun Nov 30, 2008 12:44 am

Re: Fixing a custom filter

Post by gibsongk55 »

No I am using openoffice calc. I have two dropdowns for filtering that works with a criteria worksheet in another tab and also with the VB macros. Like i said I used winmerge to check all this data and it's all the same. No difference.

Everything I checked seems the same between the original spreadsheet and the current one only difference like i said I changed some columns.

I even clicked on the drop downs and checked data filter -- advanced filter and validity all have the same criteria. I don't know where else to look that the columns change is affecting it. The guy that wrote it is unavailable so I don't know. Guess i could try and hire someone else.


Gibs
OOo 4.1.X on MS Windows 7 UltimateX64, Open Office Calc
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Fixing a custom filter

Post by Villeroy »

After deleting columns, any reference to the deleted column is lost. You have to create new references. Next time you replace cell contents which raises another set of problems when the height of the data range changes.
A spreadsheet can't compete with a database, no matter how much macro code you throw at it. Possibly, the developer of your spreadsheet solution did not take into account that sheet columns can be deleted by users.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
gibsongk55
Posts: 43
Joined: Sun Nov 30, 2008 12:44 am

Re: Fixing a custom filter

Post by gibsongk55 »

I understand that. The VB code wouldn't change when i deleted and added columns. The columns that are filtering are still in the same place. The data range is also the same. So there must be something i am missing that was affected just not sure where.
OOo 4.1.X on MS Windows 7 UltimateX64, Open Office Calc
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Fixing a custom filter

Post by Villeroy »

More than 20 years ago, I caused a severe loss of money with such an "Excel solution" because someone deleted rows where I did not expect anyone to delete rows. Thousands of clients received the invoices of some other client then. It is too easy to break things when you try to develop something without actually developing anything.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply