Skip to content

Can't compile #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dsrlb opened this issue Feb 18, 2014 · 17 comments · Fixed by #23
Closed

Can't compile #22

dsrlb opened this issue Feb 18, 2014 · 17 comments · Fixed by #23

Comments

@dsrlb
Copy link

dsrlb commented Feb 18, 2014

I'm unable to get this to compile on Office 2010 x64 or Office 2013 x64. Anybody else having this issue?

@timhall
Copy link
Member

timhall commented Feb 18, 2014

Hi @dsrlb, I've been meaning to test Excel-REST with 64-bit Excel since adding the timer functionality. Is it giving any details on what is causing it to fail to compile? (My guess it's SetTimer or KillTimer in RestHelpers)

@timhall
Copy link
Member

timhall commented Feb 18, 2014

Looking back at the source for the timer implementation, SetTimer and VBA, I think it may be the LongLong datatype, which I thought was a typo. I'll post a patch and see if that fixes the compilation issue.

@timhall
Copy link
Member

timhall commented Feb 18, 2014

@dsrlb Will you replace RestHelpers in your project with the following updated version and see if it resolves the compilation error?

https://raw2.github.com/timhall/Excel-REST/64-bit-compile/src/RestHelpers.bas This code has been merged in version 2.1.3 and later

@dsrlb
Copy link
Author

dsrlb commented Feb 18, 2014

Thanks for the quick response!

I'll try, but I'm not sure if I get that far. I'm getting an error on the module text "Version 1.0 CLASS". Yes, I did import the file, not add it.

I did go back and add some conditional compilation stuff for the declare statements.

@timhall
Copy link
Member

timhall commented Feb 18, 2014

That's definitely strange that Excel's not automatically removing the Version 1.0 CLASS and other header information on import, that would definitely cause an issue. I would recommend removing any of the files that still have that info and re-importing. Do you mind opening up the Blank Excel-REST workbook that includes just the Excel-REST files and seeing if you have the same issue with compiling it?

@dsrlb
Copy link
Author

dsrlb commented Feb 18, 2014

image

@dsrlb dsrlb closed this as completed Feb 18, 2014
@dsrlb dsrlb reopened this Feb 18, 2014
@dsrlb
Copy link
Author

dsrlb commented Feb 18, 2014

Sorry, didn't mean to close it.

@timhall
Copy link
Member

timhall commented Feb 18, 2014

Based on the screenshot, it looks like something went awry during the import because the files listed should be in a Classes folder rather than the Modules folder. I would try removing them and re-importing and see if they are put in the Classes folder

@dsrlb
Copy link
Author

dsrlb commented Feb 18, 2014

I'm able to get it to compile by doing the following:

  1. Use the Blank Excel-REST workbook
  2. Remove the RequestHelpers module
  3. Replace the RequestHelpers.bas code with the code listed above
  4. Import the new RequestHelpers.base file

Off to see if I can get the example GetDirections code to work.

@dsrlb
Copy link
Author

dsrlb commented Feb 18, 2014

I've gotten it to work successfully with the new version of the RequestHelpers module and the Google GetDirections code.

Next question, any ideas on why those classes won't import properly with Excel 2010 x64 or Excel 2013 x64?

Ideally we would like to be able to import them into another workbook application and use them.

@timhall
Copy link
Member

timhall commented Feb 18, 2014

I wonder if it's something in the header making it incompatible. Will you export the RestRequest class from the working Excel file and paste the header from that exported file here so that I can see if anything is different?

@dsrlb
Copy link
Author

dsrlb commented Feb 18, 2014

Here's the export of the RestRequest.cls file form the working workbook:

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "RestRequest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True

@timhall
Copy link
Member

timhall commented Feb 18, 2014

(trimmed your response to fit better) Thanks for checking for me, I'll add that in and see how it affects the 32-bit version

@timhall
Copy link
Member

timhall commented Feb 19, 2014

@dsrlb Split off this particular issue into a new one since compiling is working now.

@przemoli
Copy link

przemoli commented Mar 7, 2014

Code listing returns 500 Internal error. Can You repost it?
EDIT:
Never mind, that code was merged, right? (I'm using 2.3.0)

@timhall
Copy link
Member

timhall commented Mar 7, 2014

@przemoli Yes, this code has been merged and is included in version 2.1.3 and later

@bluish5
Copy link

bluish5 commented Mar 27, 2018

I had the same problem as @dsrlb, because I copy-pasted the .cls/.bas files into Microsoft Access, instead of importing them with Import file...
The lines that cause error should not be there if you import the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants