@Paulked, I notice the use of Chrw(176), Chrw(39), Chrw(34), Chrw(&H2032) & Chrw(&H2033). I've not seen that before and was wondering if it should be Chr$ rather than Chrw?
@Paulked, I notice the use of Chrw(176), Chrw(39), Chrw(34), Chrw(&H2032) & Chrw(&H2033). I've not seen that before and was wondering if it should be Chr$ rather than Chrw?
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
Hey ho, it seemed to be a good article, shame it didn't produce.
Semper in excretia sumus; solum profundum variat.
1. Which Paul?
2. Probably me, since I did not use a minus sign.
But I think the conversion is correct
Capture.JPG
Did you have the second parameter = 1 since I changed the call format in my sub?
' Converts decimal latitude, longitude or azimuth value to degrees/minutes/seconds string format' ConvType = -1 Longitude, = 0 Azumuth, = 1 Latitude
However, if you have DMS with the trailing "S" do you want the leading "-" also?
The original sub used trailing N/E/S/W so I just followed their approach
Having both seems redundant and possibly ambiguous (since -10 S could be interpreted as +10 N), but if you want the "-" and/or no trailing NESW, it's easy enough to change my function
---------------------------------------------------------------------------------------------------------------------
Paul
Remember: Tell us WHAT you want to do, not HOW you think you want to do it
1. Use [CODE] ....[/CODE ] Tags for readability
[CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
2. Upload an example
Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
3. Mark the thread as [Solved] when you have an answer
Thread Tools (on the top right corner, above the first message)
4. Read the Forum FAQ, especially the part about cross-posting in other forums
http://www.vbaexpress.com/forum/faq...._new_faq_item3
ChrW is for Unicode (2 byte) characters, but since you're on a Mac, I don't think you'd want ChrW
https://docs.microsoft.com/en-us/off...p/chr-function
Chr(charcode)
ChrB(charcode)
ChrW(charcode)
The required charcode argument is a Long that identifies a character.
Remarks
Numbers from 0–31 are the same as standard, nonprintable ASCII codes. For example, Chr(10) returns a linefeed character. The normal range for charcode is 0–255. However, on DBCS systems, the actual range for charcode is -32768–65535.
Note
The ChrB function is used with byte data contained in a String. Instead of returning a character, which may be one or two bytes, ChrB always returns a single byte.
The ChrW function returns a String containing the Unicode character except on platforms where Unicode is not supported, in which case, the behavior is identical to the Chr function.
Note
Visual Basic for the Macintosh does not support Unicode strings. Therefore, ChrW(n) cannot return all Unicode characters for n values in the range of 128–65,535, as it does in the Windows environment. Instead, ChrW(n) attempts a "best guess" for Unicode values n greater than 127. Therefore, you should not use ChrW in the Macintosh environment.
---------------------------------------------------------------------------------------------------------------------
Paul
Remember: Tell us WHAT you want to do, not HOW you think you want to do it
1. Use [CODE] ....[/CODE ] Tags for readability
[CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
2. Upload an example
Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
3. Mark the thread as [Solved] when you have an answer
Thread Tools (on the top right corner, above the first message)
4. Read the Forum FAQ, especially the part about cross-posting in other forums
http://www.vbaexpress.com/forum/faq...._new_faq_item3
As I said, I found that on the web, I'll go with Paul H said above
Semper in excretia sumus; solum profundum variat.
---------------------------------------------------------------------------------------------------------------------
Paul
Remember: Tell us WHAT you want to do, not HOW you think you want to do it
1. Use [CODE] ....[/CODE ] Tags for readability
[CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
2. Upload an example
Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
3. Mark the thread as [Solved] when you have an answer
Thread Tools (on the top right corner, above the first message)
4. Read the Forum FAQ, especially the part about cross-posting in other forums
http://www.vbaexpress.com/forum/faq...._new_faq_item3
Semper in excretia sumus; solum profundum variat.
Thank you to both of you
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
End result here.... ditched both Mac's ( for calculating this file) and purchased a Dell laptop. It runs the Vincent functions brilliantly. Thanks to all you contributed.
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
Expensive fix! I don't have a Mac so I can't compare the two, but I would have thought that any computer would calculate a formula to get the same result... isn't that what they are for?
Anyway, good to know you're sorted
Semper in excretia sumus; solum profundum variat.