BarkersIT
04-10-2007, 03:49 AM
Hello everyone,
I have been given an excel document which is an official company document created in excel.
I have a database which will populate the excel form by using the TransferSheet(acExport, 8, table name, filename, false, range) command in VB.
Part of the excel sheet has a table with four columns. The first column is made up of only the column A and has values from 1 to 10, The second column is made up from only the column B and is the first column populated from the database, the third column is made up of a merge from C to L and is the second column populated from the table, the fourth column is made up of a merge from M and N and is the last column populated from the database.
I was under the impression that by merging cells they became one cell. Therefore the range I have given in the VB command is B32:N41. Which spans what look like 3 cells.
When i run the command the first column made up of B is correct. The second column made up of the C to L merge is also correct but the last column made up of M and N is empty. However, if you click over the second cell at D you can see that the value that should be in the M and N merge is infact here. It says sum = 200 down where you can see numlock toggle if you keep pressing numlock. These are the correct values as I can go into the access table and look them up.
How can I get the value that is going to the cell in the D column to go to the M and N merged cell?
Thanks
I have been given an excel document which is an official company document created in excel.
I have a database which will populate the excel form by using the TransferSheet(acExport, 8, table name, filename, false, range) command in VB.
Part of the excel sheet has a table with four columns. The first column is made up of only the column A and has values from 1 to 10, The second column is made up from only the column B and is the first column populated from the database, the third column is made up of a merge from C to L and is the second column populated from the table, the fourth column is made up of a merge from M and N and is the last column populated from the database.
I was under the impression that by merging cells they became one cell. Therefore the range I have given in the VB command is B32:N41. Which spans what look like 3 cells.
When i run the command the first column made up of B is correct. The second column made up of the C to L merge is also correct but the last column made up of M and N is empty. However, if you click over the second cell at D you can see that the value that should be in the M and N merge is infact here. It says sum = 200 down where you can see numlock toggle if you keep pressing numlock. These are the correct values as I can go into the access table and look them up.
How can I get the value that is going to the cell in the D column to go to the M and N merged cell?
Thanks