Notices

X50 / X51 Forums Talk about anything related to the X50 / X51 series.

Reply
 
LinkBack Thread Tools
Old 05-16-08, 07:55 AM   #1 (permalink)
Aximsite Rookie
 
Join Date: Oct 2004
Location: China
Posts: 77
Thanked 0 Times in 0 Posts
VBA and correct file path for PDA

I'm really not sure where to paste this - I couldn't seem to find a relevent place under software.

I have an Axim X50v. I want to write some code, either in Visual Basic 6 or in VBA within Excel, to send a file to a particular place on my CF card. Within Explorer in Windows XP, the path in the address bar is : "\CF Card\SYNC\Spending in China.xls". However, when I type filedatetime("\CF Card\SYNC\Spending in China.xls") I get the message 'Path not Found'.

Opening windows explorer, I can find this folder under :

My Computer - Mobile Device - My Windows Mobile-Based Device - CF Card - SYNC

Right-clicking on 'My Windows Mobile-Based Device' and going to properties shows :

Type : System Folder
Location : \My Documents

So I've tried to type :

filedatetime("C:\Documents and Settings\AlfCheesey\My Documents\My Windows Mobile-Based Device\CF Card\SYNC\Spending in China.xls")

But this also returns a 'path not found' error.

What would be the correct way of writing this path?

Last edited by AlfCheesey; 05-16-08 at 08:35 AM.
AlfCheesey is offline   Reply With Quote
Sponsor Ads
Old 05-16-08, 08:23 AM   #2 (permalink)
Box
Aximsite Hall of Fame
 
Box's Avatar
 
Join Date: Apr 2006
Location: On the move again.
Posts: 8,594
Thanked 149 Times in 131 Posts

Awards Showcase
Aximsite Active Silver Member Member of the Month Bronze Poster Aximsite Gold Contributors Aximsite Contest Winner Aximsite Active Bronze Member 
Total Awards: 6

I'm not quite sure what you are trying to do but,

If you are trying to get to that file path on the X50v from the X50v, the path would be \\CF Card\SYNC\Spending in China.xls

Note the extra backslash.
Box is offline   Reply With Quote
Old 05-16-08, 08:27 AM   #3 (permalink)
Aximsite Rookie
 
Join Date: Oct 2004
Location: China
Posts: 77
Thanked 0 Times in 0 Posts
I'm trying to write a program from Windows XP to synchronise certain files, copy them from my desktop to a certain area on the CF card within my Axim.

I've tried this too,

print filedatetime("\\CF Card\SYNC\Spending in China.xls")

from the debug window of VBA within Excel, but again it says 'Path not found'. Strangely it takes a few seconds to return this error.

I'm only saying filedatetime as a quick check to see that I can actually see this path. Maybe I'll just try copying the file from the PC to this path, see if it still has problems.

Last edited by AlfCheesey; 05-16-08 at 08:34 AM.
AlfCheesey is offline   Reply With Quote
Old 05-16-08, 08:34 AM   #4 (permalink)
Aximsite Rookie
 
Join Date: Oct 2004
Location: China
Posts: 77
Thanked 0 Times in 0 Posts
Ok, it still doesn't work. This is my code :

Dim SourceFolder, DestFolder As String
Dim SourceFName, DestFName As String

SourceFolder = "F:\Current Interest\Financial\"
DestFolder = "\\CF Card\SYNC\"

SourceFName = "SiC Blank.xls"

DestFName = "2" & SourceFName

' Backup File
Set fs = CreateObject("Scripting.FileSystemObject")
fs.Copyfile SourceFolder & SourceFName, DestFolder & DestFName, True

It gets to the last line, tries to process it, then returns 'Path not found'
AlfCheesey is offline   Reply With Quote
Old 05-16-08, 08:43 AM   #5 (permalink)
Box
Aximsite Hall of Fame
 
Box's Avatar
 
Join Date: Apr 2006
Location: On the move again.
Posts: 8,594
Thanked 149 Times in 131 Posts

Awards Showcase
Aximsite Active Silver Member Member of the Month Bronze Poster Aximsite Gold Contributors Aximsite Contest Winner Aximsite Active Bronze Member 
Total Awards: 6

I suspect that you might be having problems because, I assume, you are connected to the X50v via active sync.
I think you are therefore trying to run through two different systems and the path gets mixed up.
You could try using Cardexport, which would allow the computer to see the CF card as a drive without going through active sync.
Box is offline   Reply With Quote
Old 05-16-08, 09:11 AM   #6 (permalink)
Aximsite Rookie
 
Join Date: Oct 2004
Location: China
Posts: 77
Thanked 0 Times in 0 Posts
Thanks for the link.

However, I can manually copy and paste a file from my PC to my Axim's CF card through explorer. I can't understand why I wouldn't be able to do that with VB. But as you say, it probably is something to do with activesync.

If I can't do this directly within VB, I will use something like Mobisync to copy the files over.
AlfCheesey is offline   Reply With Quote
Reply

Tags
correct, file, path, pda, vba

Sponsor Ads

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:26 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright © 2003-09 LeckMedia, LLC