I have a program which exports data from Access to Excel through VBA. But I find the following problem for the Excel file.
I have a merged cell called "Remarks", in which its value is very long that it have many rows in the cell. But whenever I open the Excel file, I find only one row...
Yes, I want to ask if I can export data to a text file, what specifically is the coding for opening a file and then write things to it?
I want to write a module to output data together with some defined set of characters to a text file. How can I do that?
Is that the TransferTextfile can...
I am trying to export data to an Excel file, which has a title "Application List" placed across cell A1 to cell E1. I want the title to be align in the center rather than in the left.
However, error is found in the indicated line, saying:
"Unable to set the HorizontalAlignment...
I would like to ask is it possible to add double quote in a string.
Since when assigning value to a string variable, we have to use double quote to quote the text, so I wonder a double quote can be included in the text, so that double quote can be displayed.
Thank for your help in advance.
I am trying to export data from a query to an excel file. The following codes work fine.
But, I would like to ask is it possible for the system to start writing data to cell A13 instead of A1?
Private Sub cmd_export2_Click()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9...
I would like to export data from Access to Excel, with some formatting done in Excel. When I run the following codes, two errors are found, in which I don't know how to correct them.
Private Sub cmd_export_Click()
Dim strFile As String
Dim xlobj As Object, strExcelFile As String
strExcelFile =...
As I am trying to open an Excel for reporting from the Access database, I would like to set the format Excel using VBA.
I would like to know specifically what is the coding for mering cells(e.g. D3, D4, D5) into one and then check the "wrap text" property for it.
Thank you for help...
I have a textbox named "Remarks" in the form which is bounded to the Text field "Remarks" in a table.
My problem is:
Text field can only store 255 characters. But the value input in "Remarks" field will sometimes exceed that length.
I would like to ask what can I...
Thanks for your reminder.
But I would like to ask how to combine two rows into one with a space in between?
That means,
First Name
Tai Man
Cecila
Ka Man
Tin Yan
Choi Fan, Mavis
Last Name
Chan
Wong
Leung
Fung
Chan
After combinatin as (First Name + space + Last Name):
Name
Chan Tai Man
Wong...
I have two columns: First Name & Last Name
In the column, Last Name, each value in it has an extra space in front. What I would like to do is to remove the extra space for all values in that column.
Originally the column is:
Last Name
Tai Man
Cecila
Ka Man
Tin Yan
Choi Fan, Mavis
What I...
Thanks for reminding me of the split() function!
I can store each substring by using the split() function now, as indicated as follows:
Dim approver_str() As String
approver_str = Split(Me.approver_name, vbCrLf, , vbDatabaseCompare)
Yes, you are right!
I should put the codes for msgbox and do the checking for the msgbox input in the Form_Unload() event instead of Form_Close() event to allow the user return to the form if they click cancel in the msgbox.
Really thx!
I have now changed the 3 subforms to:
1 main form + 2 subforms
Main Form - Add_Company_Record_Form
Subform 1 - Add_Department subform
Subform 2 - Add_Asset subform
I would like to achieve the followings:
When a particular record in "Add_Department subform" is clicked, the...
I have designed a form in which when the user clicks the "Close" button in the top right hand corner, a msgbox will popped up. If user clicks "Cancel" in the msgbox, the form will NOT be closed.
As shown below, I have tried: Me.Undo
However, it doesn't work.
Private Sub...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.