Search results

  1. J

    Export to Excel - Colum formatting

    Solved. As recommended I wrote the format portion of the code before the export. Working great: Set appExcel = New Excel.Application appExcel.Workbooks.Add Set wksData = appExcel.Workbooks(1).Worksheets(1) wksData.Range("L:L").Select appExcel.Selection.NumberFormat = "@" For intRow_Index = 0...
  2. J

    Export to Excel - Colum formatting

    This is also what is confusing me. Unfortunately my knowledge is quite poor in programming. I think a bit more info will help. Data that I export from my lstbox to excel which is not formatting correctly is text. Examples are: 0123456789 or 12121212CC222, etc,. This meand that although has...
  3. J

    Export to Excel - Colum formatting

    Sorry friends if I am bothering you on this but I am almost near to the solution. I have been lookin at all your suggestions and without having to do much changes I have used Arnel's code and chaged it as follows: appExcel.Cells.Select appExcel.Cells.EntireColumn.AutoFit...
  4. J

    Export to Excel - Colum formatting

    thanks Arnel, sorry a bit confused. This is how I have my code: Next intColumn_Index Next intRow_Index wksData.Range("A:" & Chr(65 + UBound(lstBanks))).Select appExcel.Selection.NumberFormat = "@" MsgBox "Your selection has been exported to Excel. Click OK to open.", vbInformation, "FindMe...
  5. J

    Export to Excel - Colum formatting

    Thanks Arnel, this time I get an error on the UBound. When I add the additional bracket, additional spaces are added. Sorry for not explaining myself correctly. wksData.Range("A:" & Chr(65 + UBound(lstBanks))).Select
  6. J

    Export to Excel - Colum formatting

    Sorry Crystal but cannot open the Bas file due to restrictions on my PC.
  7. J

    Export to Excel - Colum formatting

    Thank you Crystal, will give it a look.
  8. J

    Export to Excel - Colum formatting

    Hello Arnel, the line wksData.Range("A:" & Chr(65+Ubound(lstBanks)).Select shows an error. Some missing bracket? Thank you
  9. J

    Export to Excel - Colum formatting

    Hello, I am using this code, to export data from a list box to excel. It works great but the only problem is that it does not keep the last column formatting. In my db it's a text (can contain numbers and letters). When I export I get strange numbers like 4564.15+65. I was wandering if is...
  10. J

    Change name to Report

    Thank you Gasman, would you assist me with some code? Thank you
  11. J

    Change name to Report

    Hello, I have a form with a cmd button which executes a macro to export a report of this form via email as a pdf file. The file shows the same name of the report (report1). I was thinking to change it's name and have used a solution which have already uses with the printcurrentrecords on forms...
  12. J

    Listbox with Hyperlink

    Wow thank you Arnel. It's years I search the web for help on MS Access and have to admit that your replies are fast, easy and have always a solution. Thank you
  13. J

    Listbox with Hyperlink

    Thank you Arnel, I am getting an error (7971) and have noticed that after a security warning that advises about hyperlink from trusted sources, at the beginning and end of the hyperlink I get an #. Obviously this # are not in the hyperlink. Another think I did not indicate before, is that the...
  14. J

    Listbox with Hyperlink

    Hello, I was wandering if you could help me out with this. I have created a table with two fields: Title (records list name of mostly used web/intranet pages) Web Pages (hyperlinks of the web/intranet pages in field Title) The data type of the web pages field is set to hyperlink and I am able...
  15. J

    Export list box records to excel

    That's just perfect! Great help. Thanks Arnel
  16. J

    Export list box records to excel

    Hello friends, Searching several web sites, I have found a great code to export contents of a listbox directly to Excel. The only problem is that it does not export the "0" column. My listbox has 11 columns and the code exports data starting the count from column 1. Is there a way anyone can...
  17. J

    List box query criteria

    Tbl2
  18. J

    List box query criteria

    Hello. I would appreciate some help in trying to solve this problem. I apologize if I have not been too clear. My db has a form with a combo, a list box and two tables. The combo is used as query criteria and has it's record source in tbl1 Tbl1 has has three fields: Codes, Prefix and...
  19. J

    Change column count in listbox

    Thanks
  20. J

    Change column count in listbox

    Thank you Bob, I was hoping there was a way to adjust the number of columns and their with dynamically, basically in an automated way depending on the number of fields of the query selected in the combo.
Back
Top Bottom