DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Visual Basic 4 / 5 / 6 (http://www.daniweb.com/forums/forum4.html)
-   -   Help with adding a line in VB 6.5 (http://www.daniweb.com/forums/thread157864.html)

leecavcu Nov 17th, 2008 10:45 am
Help with adding a line in VB 6.5
 
Thanks for the help. I have a workbook with VB code in it to add a new line. When I add a new line, the new cells automatically have their respective formulas in it. I also have it set so another worksheet with the same table adds a line. In the second worsheet, I want text from the first worksheet inserted into the cells of the second worksheet. Here is the line that is giving me problems in my code. Everything is defined correctly. I think it is just a syntax error.

[roomM = "=IF(ISBLANK('Air Balance (e)'!$A" & newrow & "),"" "",'Air Balance (e)'!A" & newrow & " "
Cells(newrow, 1).Formula = roomM]

"newrow" is an integer. It defines the row number of where you inserted the new row. "Air Balance (e)" is the first worksheet. So, if cell (A,newrow) in Air Balance (e) is blank, then display nothing. Otherwise, display cell (A, newrow) from worksheet Air Balance (e).

leecavcu Nov 17th, 2008 10:49 am
Re: Help with adding a line in VB 6.5
 
Never mind. I was missing a ) in the first line at the end. I've been staring at this too long.


All times are GMT -4. The time now is 1:54 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC