98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access Training and help » Importing data from excel to access using automation within acce
Importing data from excel to access using automation within acce
Resolved · Low Priority · Version 2007
James has attended:
Access Advanced course
Access VBA course
Importing data from excel to access using automation within acce
Within access vba I can open a new excel session and browse and open an excel file. I then can go to cell "a1". My problem is going from there. I want to do the excel command .end(xldown), I then want to record what row the last row of data is on.
I have tried an alternative to the above which was:
lrow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
but this does not seem to work
RE: Importing data from excel to access using automation within
Hi James,
Thank you for your question and welcome to the forum.
This small bit of code will highlight the last row in your table that contains data:
Sub FindLastRow()
Dim intRow As Integer
intRow = Range("A1").CurrentRegion.Rows.Count
Rows(intRow).Select
I hope this answers your question.
Regards
Simon
End Sub
Will be marked as resolved in 5 days
Notice: This is an automated message. Due to inactivity, this forum post will be marked as 'resolved' if there are no further responses in the next 5 days.
Tue 24 May 2011: Automatically marked as resolved.
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Create own ribbon tab - Access 2010a. In Access click on the File tab |