Sorry, my type. I did change the code to false but still getting the same problem. I cannot view any form.
By the way, I created a similar macro and converted it to VB. It's the only way works (although not the correct way)
DoCmd.Echo False, ""
DoCmd.OpenForm "LogIn", acNormal, "", ""...
Hi, the code is in the AfterUpdate Event. The code does run without the Forms!Login.visible = True line. It works also if I put it in the OnChange event (without the hide line).
Private Sub cboLogIn_AfterUpdate()
DoCmd.Echo False, ""
DoCmd.OpenForm "FrmMenu", acNormal, "", "", , acNormal...
Hello,
For my db, I have created a form which I use as a kind of login screen that has a combo from which users select their name. Once selected, a command opens the main form.
DoCmd.OpenForm "FrmMenu", acNormal, "", "", , acNormal
DoCmd.Maximize
Since most other forms in the db have a...
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...
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...
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...
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...
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
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...