Hi
I'm having some problems with this! What I'm trying to do is allow the user to select an Excel file to upload into an Access database. At the moment I've got the upload working for a specified file (to check that the upload worked! ) but I'd like to make it so that this file can be changed.
I'm only a temp so once it's working I won't be around to change the file for them or show them how to alter the coding!!!!! Not a good idea anyway!
I have the following code, but it doesn't work and I know that there's a bit, or a lot, missing and I can't think how it should be done!
Private Sub ScorecardList_BeforeUpdate(Cancel As Integer)
Dim ScorecardPath, cardList
ScorecardPath = Dir("C:\Documents and Settings\bradlejx\My Documents\ScoreCards\Trial\*.html"
Do While cardList <= EOF
GetAttr (ScorecardPath)
cardList = Dir
Loop
End Sub
It's mainly the Do While Loop that I'm having problems with, as I think that I've done the Path correctly.
Please correct me if I'm wrong. We learn from our mistakes and I make a lot of mistakes unfortunately as I'm only a beginner at VBA!
Thanks
Jane
[PC2]
I'm having some problems with this! What I'm trying to do is allow the user to select an Excel file to upload into an Access database. At the moment I've got the upload working for a specified file (to check that the upload worked! ) but I'd like to make it so that this file can be changed.
I'm only a temp so once it's working I won't be around to change the file for them or show them how to alter the coding!!!!! Not a good idea anyway!
I have the following code, but it doesn't work and I know that there's a bit, or a lot, missing and I can't think how it should be done!
Private Sub ScorecardList_BeforeUpdate(Cancel As Integer)
Dim ScorecardPath, cardList
ScorecardPath = Dir("C:\Documents and Settings\bradlejx\My Documents\ScoreCards\Trial\*.html"
Do While cardList <= EOF
GetAttr (ScorecardPath)
cardList = Dir
Loop
End Sub
It's mainly the Do While Loop that I'm having problems with, as I think that I've done the Path correctly.
Please correct me if I'm wrong. We learn from our mistakes and I make a lot of mistakes unfortunately as I'm only a beginner at VBA!
Thanks
Jane
[PC2]