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.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Since you have posted this question in a general Excel forum, and not one specific to Match Portal, I suggest you start by telling us what Match Portal is.
 
Upvote 0
Sorry Jeff. This is the file of which the code needs to be edited to make it compatible to run in all versions of excel be it 32 bit or 64 bit. I am not sure what the compile error in hidden module exactly means. If someone can explain then it may be a great help to solve this issue.
Since you have posted this question in a general Excel forum, and not one specific to Match Portal, I suggest you start by telling us what Match Portal is.

Match Portal.xlsm
 
Upvote 0
Unprotect the code and then run it again to see if it gives a more specific error.
 
Upvote 0
OK, so Match Portal is simply your Excel file with VBA code. I thought it might be a commercial application or add-in.

I do not get an error on Windows 10 with 64-bit Excel 365. To me the code does not look protected.

What system are you running the code on that causes the error? Specify OS, version of Excel, and whether Excel is 32-bit or 64-bit. What files are in the Excel STARTUP folder?
 
Upvote 0
I did that and tried. It didn't work in their system where I was demonstrating.
 
Upvote 0
OK, so Match Portal is simply your Excel file with VBA code. I thought it might be a commercial application or add-in.

I do not get an error on Windows 10 with 64-bit Excel 365. To me the code does not look protected.

What system are you running the code on that causes the error? Specify OS, version of Excel, and whether Excel is 32-bit or 64-bit. What files are in the Excel STARTUP folder?
Try testing it with 32-bit. I will have to check with them tomorrow as it was past closing time when I left. I should have checked the version at least. I was hoping to modify and add a code that will run in both the 32 bit and 64 bit like in one of the applications where JohnnyL had written in the beginning of the code. I will check and post that code in sometime.
 
Upvote 0
Rich (BB code):
Option Explicit
'
'Created by Johnnyl and updated on 15-06-2022

#If VBA7 Then
' Timer settings for 64Bit Excel
    Private Declare PtrSafe Function getFrequency Lib "kernel32" Alias _
            "QueryPerformanceFrequency" (cyFrequency As Currency) As Long
    Private Declare PtrSafe Function getTickCount Lib "kernel32" Alias _
            "QueryPerformanceCounter" (cyTickCount As Currency) As Long
#Else
' Timer settings for 32Bit Excel
    Private Declare Function getFrequency Lib "kernel32" Alias _
            "QueryPerformanceFrequency" (cyFrequency As Currency) As Long
    Private Declare Function getTickCount Lib "kernel32" Alias _
            "QueryPerformanceCounter" (cyTickCount As Currency) As Long
#End If
'
If I add this in the beginning of the code will it work.? If Yes then I can try tomorrow on their system.
Or
This is something completely different and no where connected to the above error.
 
Upvote 0
Unprotect the code and then run it again to see if it gives a more specific error.
The code is not working at all. If it can run a few lines, then I can give you the exact line of error.
 
Upvote 0
Rich (BB code):
Option Explicit
'
'Created by Johnnyl and updated on 15-06-2022

#If VBA7 Then
' Timer settings for 64Bit Excel
    Private Declare PtrSafe Function getFrequency Lib "kernel32" Alias _
            "QueryPerformanceFrequency" (cyFrequency As Currency) As Long
    Private Declare PtrSafe Function getTickCount Lib "kernel32" Alias _
            "QueryPerformanceCounter" (cyTickCount As Currency) As Long
#Else
' Timer settings for 32Bit Excel
    Private Declare Function getFrequency Lib "kernel32" Alias _
            "QueryPerformanceFrequency" (cyFrequency As Currency) As Long
    Private Declare Function getTickCount Lib "kernel32" Alias _
            "QueryPerformanceCounter" (cyTickCount As Currency) As Long
#End If
'
If I add this in the beginning of the code will it work.? If Yes then I can try tomorrow on their system.
Or
This is something completely different and no where connected to the above error.
That code is for the Timer function.
You don't have it in the code, so that code will not fix the error.
 
Upvote 0

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

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