ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to rm the "extra row"? (https://www.excelbanter.com/excel-programming/278573-how-rm-extra-row.html)

active_x[_15_]

how to rm the "extra row"?
 
how to rm the "extra row"?

In sheets("data_entry"), there is a column (Q) for "Dye Mode", where
some rows are EMPTY but NOT ALL.

After the "Make Sticker" button(in data_entry) is pressed, sticker
sheets are generated and a problem arises..

Problem:
In between each sticker, there should be ONLY ONE empty row.
The macro is ok IF ALL the cells in "Dye Mode" are FILLED, AND
REPLACE:
------------------------------------------------------------------------------------If
.Cells(rr, cDYE_MODE) < "" Then 'chk dye mode exist, if yes
'fill dye mode
Cells(rCurr + 1, cc + 2) = "(" & .Cells(rr, cDYE_MODE) & ")"
Else
rCurr = rCurr - 1 'rm row for dye mode
End If
------------------------------------------------------------------------------------WITH:
------------------------------------------------------------------------------------
'fill dye mode
Cells(rCurr + 1, cc + 2) = "(" & .Cells(rr, cDYE_MODE) & ")"
------------------------------------------------------------------------------------

However, in case ONLY SOME cells are filled, the macro generates ONE
MORE empty row, which is not desired to appear, between some stickers!


It seems that "rITEM" and "rCurr" in the vba cause this problem.

How to re-write the macro so that the "extra rows" do NOT arise?

File Attached: http://www.exceltip.com/forum/attach...?postid=290084 (help17.zip)

------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


active_x[_16_]

how to rm the "extra row"?
 
(referring to the same attachment)
error date format?!

NONE of the dates in the sticker sheets correctly show today's date as
the vba write:
Cells(rCurr + 1, cc + 2) = Format(Date, "dd/mm/yyyy")
Why? (question 1)

Some dates EVEN appear to be "US$37,662.00"!!
Why? (question 2)

And how to correct to two of the above problems? (question 3)



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



All times are GMT +1. The time now is 01:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com