Excel 2010 - Need A hand

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
2,061
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Hi, in another thread I outlined problems running version 2007. To resolve tehm I dexcided to buy Office 2010
hoping that would fix things. I've installed it but trouble straight away... e.g.

The code in this project must be updated for use on 64-bit
systems. Please review and update Declare statements and
then mark them with the PtrSafe attribute.

I'm attempting Google how to mark with PtrSafe etc but can't find anything to help yet.Could someone please explain, or perhaps advise me to quit and use the 32 bit version?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi AlexanderBB. Sounds like you're not having much fun. It's only any API code that U have that will require adjustment for 64 bit use. For example this 32 bit code...
Code:
 Private Declare Function IsClipboardFormatAvailable Lib "user32" (ByVal wFormat As Integer) As Long
changes to 64 bit..
Code:
 Private Declare PtrSafe Function IsClipboardFormatAvailable Lib "user32" (ByVal wFormat As Long) As Long
Note the Ptrsafe declaration. Sometimes the Long will change to Longptr. Unfortunately, I don't know when or why. There is a fair bit of info to be googled on the topic. If U google the function name, the PtrSafe conversion may be already available. If U look in your module code, maybe U won't have that much stuff to be changed and I'm sure if you're stuck someone here will be able to help. Good luck. Dave
 
Upvote 0
Hi Dave, no fun indeed it's a miserable situation! Thanks for the tip about ptrSafe which I've done and seem to have got over that hurdle. At least in part. Now I find a was-working routine with
Code:
MatchSpec = PathMatchSpec(StrPtr(FileName), StrPtr(FileSpec))
is gving Type MisMatch error.

In Addition I had the same problem that made me quit Excel2007 and buy 2010. Missing Common Controls 6.0 (SP6). After many hours I found the fix was to untick the MISSING entry and just carry on !Hmm LOL Am still doing Debug-Compile and finding a few things. One is puzzling

DLookUp - Sub Or Function not defined. I think this used to be a built in command. Is it now removed? Are there many differeces like that ?

Thanks.
 
Upvote 0
Never heard of Dlookup but there is a Vlookup.
Code:
MatchSpec = PathMatchSpec(StrPtr(FileName), StrPtr(FileSpec))
The PathMatchSpec is some kind on function (maybe sub) that is looking for 2 variable input of some type. Maybe strings...
Code:
MatchSpec = PathMatchSpec(CSTR(FileName), CSTR(FileSpec))
HTH. Dave
 
Upvote 0
As far as I am aware Dlookup is still only an Access function in VBA. If it is being used in Excel VBA then it is probably a UDF (I have a version myself).
 
Upvote 0
Thanks for the clue about DLookup.. duh, I had imported a class module I'd written in Access.... and hadn't realised until seeking out differences in the two Excels.
However MatchSpec is (I think) and API call and fine in Excel2007 (which I have gone back to). It may be also be ok in Excel2010 32bit, but I'm not game to try it, just yet!
PS Vlookup gives me "Sub or Function Not Defined". Maybe need to add a Reference ?
 
Upvote 0
Put either Application. or WorksheetFunction. in front of your VLookup.
 
Upvote 0
I'm finding Application.gives error 2015 or 2013 (if the worksheets name is included) and WorksheetFunction. error 1004
 
Upvote 0
It might help if you post the code Including any variables you are using.

Try it with the syntax...

Result = Application.WorksheetFunction.Vlookup ( lookup_value, table_array, col_index_num, [range_lookup] )
 
Last edited:
Upvote 0
Hi, in another thread I outlined problems running version 2007. To resolve tehm I dexcided to buy Office 2010
hoping that would fix things. I've installed it but trouble straight away... e.g.

The code in this project must be updated for use on 64-bit
systems. Please review and update Declare statements and
then mark them with the PtrSafe attribute.

I'm attempting Google how to mark with PtrSafe etc but can't find anything to help yet.Could someone please explain, or perhaps advise me to quit and use the 32 bit version?
Unless you have monstrously large files to handle, I think uninstalling your 64-bit version of Excel and installing the 32-bit version will remove all of the problems you are having.
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,986
Members
452,541
Latest member
haasro02

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