ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print on worksheet (https://www.excelbanter.com/excel-programming/400571-print-worksheet.html)

Arne Hegefors

Print on worksheet
 
Hi! I have a simple problem. I want to print a certain value in on a
worksheet in a loop. For each loop I want to print on one cell below the
previous one. However there is something wrong with the line below, it does
not write anything on the worksheet. pls help!


Worksheets("Settings").Range("a1").Offset(1, k) = strDate


Zone[_3_]

Print on worksheet
 
You could put this line in before your line to see which cell you're
addressing:
msgbox Worksheets("Settings").Range("a1").Offset(1, k).address
And you could add this line to see what strDate is:
msgbox strDate
Or, to see the date formatted as a date,
msgbox format(strdate,"mm/dd/yy")
James
"Arne Hegefors" wrote in message
...
Hi! I have a simple problem. I want to print a certain value in on a
worksheet in a loop. For each loop I want to print on one cell below the
previous one. However there is something wrong with the line below, it
does
not write anything on the worksheet. pls help!


Worksheets("Settings").Range("a1").Offset(1, k) = strDate




Mike Fogleman

Print on worksheet
 
Add .Value
Worksheets("Settings").Range("a1").Offset(1, k).Value = strDate

see if that works

Mike F
"Arne Hegefors" wrote in message
...
Hi! I have a simple problem. I want to print a certain value in on a
worksheet in a loop. For each loop I want to print on one cell below the
previous one. However there is something wrong with the line below, it
does
not write anything on the worksheet. pls help!


Worksheets("Settings").Range("a1").Offset(1, k) = strDate





All times are GMT +1. The time now is 04:02 AM.

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