Compile error in hidden module

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello JohnnyL
The application Match Portal is running perfect in every way. Today I visited a new office and tested to run Match Portal application. But I ran into this error for the first time. What could be the reason and how do I rectify it to make it compatible to run in all versions of excel.?
Compile error in hidden module Match Portal
This error commonly occurs when code is incompatible with the version, platform or architecture of this application.
 
The error you are getting is probably not caused by a difference in the version of Excel. In web searches I have not found an explanation for this particular error that applies to this file. It will be difficult to diagnose this without being able to reproduce it.

VBA is fairly forward and backward compatible between versions of Excel as far as built-in language features. You usually have problems if you refer to worksheet functions that aren't there, 32-bit API calls in a 64-bit system, or external calls, none of which apply in your file.
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
The error you are getting is probably not caused by a difference in the version of Excel. In web searches I have not found an explanation for this particular error that applies to this file. It will be difficult to diagnose this without being able to reproduce it.

VBA is fairly forward and backward compatible between versions of Excel as far as built-in language features. You usually have problems if you refer to worksheet functions that aren't there, 32-bit API calls in a 64-bit system, or external calls, none of which apply in your file.
Do you mean that I have to change the whole code ? I found this on the web
 

Attachments

  • Untitled.png
    Untitled.png
    11.7 KB · Views: 9
Upvote 0
You will need to change the Add2 to Add on these rows & anywhere else they occur
VBA Code:
    With wsDestination.Sort.SortFields
        .Clear
        .Add2 key:=Range("C2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .Add2 key:=Range("G2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .Add2 key:=Range("H2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .Add2 key:=Range("B2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    End With
 
Upvote 0
Solution
I was working on 2 different queries and I got confused with your reply was for which query. Give me sometime.
 
Upvote 0
I just replaced Add2 with add at 8 available places. After changing the code is showing the same perfect result. The question is whether this will work in 2007 / 2013 version after this change.?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top