ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   arrays (https://www.excelbanter.com/excel-programming/301936-arrays.html)

Tajin

arrays
 
I have a template that needs to be filled out from fields coming from other
excel spreadsheet available in the server( actually sheet names), I want to
make available only this values to make the choice on Worksheet_change on
that excel template, I can get all the worksheet names in msgbox one by one
but I don't know how to pass them to one of the cells in my template, should
do it on arrays?, how?, I want also to move the focus from the first cell
the one on the right side and following one to right side, like for example
if A7 is the first cell, 2nd one B7, 3rd C7, 4th D7, next A8, B8, C8, D8,
etc..

Thanks



Bernie Deitrick

arrays
 
Tajin,

If you can get the worksheet names, to write them to your template is as
simple as coding within your template

strSheetName = ...... use the same method which you are using to get the
name for the msgbox

Thisworkbook.Worksheets("Sheet1").Range("A7").Valu e = strSheetName

As to moving the focus, there are as many methods as there are VBA coders,
and the best method depends on how you are actually doing your procedure.
For example, you could simply loop:

For myCol = 1 to 4
For myRow = 7 to 15
Cells(MyRow,MyCol).Value = "whatever ..."
Next myRow
Next myCol

But, as I've said, the best method depends on what you are doing overall in
your procedure.

HTH,
Bernie
MS Excel MVP

"Tajin" wrote in message
...
I have a template that needs to be filled out from fields coming from

other
excel spreadsheet available in the server( actually sheet names), I want

to
make available only this values to make the choice on Worksheet_change on
that excel template, I can get all the worksheet names in msgbox one by

one
but I don't know how to pass them to one of the cells in my template,

should
do it on arrays?, how?, I want also to move the focus from the first cell
the one on the right side and following one to right side, like for

example
if A7 is the first cell, 2nd one B7, 3rd C7, 4th D7, next A8, B8, C8, D8,
etc..

Thanks






All times are GMT +1. The time now is 08:56 AM.

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