route217
asked on
update current macrot to add boarders to a cell range
Hi experts
How would you amend the current vba in MS Access to add boarder to a range of data based on column A i.e. until the last cell with data in column A and until column AD.
Dim xlPath As String, xlObj As Object
Dim rs As DAO.Recordset, sql As String
Dim RootMIdir As String
Set xlObj = CreateObject("excel.applic ation")
xlObj.Workbooks.Open xlPath & "REPORT_1.xls"
With xlObj
.Worksheets("R_1").Select
sql = "SELECT *"
sql = sql & " FROM R_Data"
Set rs = CurrentDb.OpenRecordset(sq l)
.Range("a2").CopyFromRecor dset rs
I have removed the file path and the activeworkbook.save filename from the above code....
How would you amend the current vba in MS Access to add boarder to a range of data based on column A i.e. until the last cell with data in column A and until column AD.
Dim xlPath As String, xlObj As Object
Dim rs As DAO.Recordset, sql As String
Dim RootMIdir As String
Set xlObj = CreateObject("excel.applic
xlObj.Workbooks.Open xlPath & "REPORT_1.xls"
With xlObj
.Worksheets("R_1").Select
sql = "SELECT *"
sql = sql & " FROM R_Data"
Set rs = CurrentDb.OpenRecordset(sq
.Range("a2").CopyFromRecor
I have removed the file path and the activeworkbook.save filename from the above code....
I would recommend that you add the Excel topic area to your request. If you click Request Attention, request that a moderator add the Excel topic to your question.
ASKER
Hi Fyed..
I have tried this under the excel subject and getting no luck with the vba
Basically unable to complete the task...
I have tried this under the excel subject and getting no luck with the vba
Basically unable to complete the task...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.