ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Programmatically putting text in title without using labels (https://www.excelbanter.com/excel-programming/339354-programmatically-putting-text-title-without-using-labels.html)

Sandy

Programmatically putting text in title without using labels
 
Hello -

I currently have a solution where people click one of two buttons - one
button will give them a set of questions related to BankA and the other will
give them a set related to BankB. Each sheet (there are 25 of them) has to
have the title of BankA or BankB, depending on what they chose. I currently
have this text put into a label for each title.

Is there a way I can just put the text into a cell and therefore be able to
just link that info via reference to the page the text was originally put in?
In other words, how do I programmatically just put text into a cell, instead
of using a label?

Any help will be greatly appreciated!
--
Sandy

Patrick Molloy[_2_]

Programmatically putting text in title without using labels
 
unless I misunjderstand
lets say BankA's title is on a sheet called 'config' in A1 anf you want the
title placed on say sheet1 and sheet2

Sub SetBank_A()
Worksheets("Sheet1").Range("A1").Value = _
Worksheets("config").Range("A1").Value
Worksheets("Sheet2").Range("A1").Value = _
Worksheets("config").Range("A1").Value

End Sub

this isn't the best of code, but it shold give you the right idea...


"Sandy" wrote:

Hello -

I currently have a solution where people click one of two buttons - one
button will give them a set of questions related to BankA and the other will
give them a set related to BankB. Each sheet (there are 25 of them) has to
have the title of BankA or BankB, depending on what they chose. I currently
have this text put into a label for each title.

Is there a way I can just put the text into a cell and therefore be able to
just link that info via reference to the page the text was originally put in?
In other words, how do I programmatically just put text into a cell, instead
of using a label?

Any help will be greatly appreciated!
--
Sandy


Sandy

Programmatically putting text in title without using labels
 
Patrick -

Thank you very much!

--
Sandy


"Patrick Molloy" wrote:

unless I misunjderstand
lets say BankA's title is on a sheet called 'config' in A1 anf you want the
title placed on say sheet1 and sheet2

Sub SetBank_A()
Worksheets("Sheet1").Range("A1").Value = _
Worksheets("config").Range("A1").Value
Worksheets("Sheet2").Range("A1").Value = _
Worksheets("config").Range("A1").Value

End Sub

this isn't the best of code, but it shold give you the right idea...


"Sandy" wrote:

Hello -

I currently have a solution where people click one of two buttons - one
button will give them a set of questions related to BankA and the other will
give them a set related to BankB. Each sheet (there are 25 of them) has to
have the title of BankA or BankB, depending on what they chose. I currently
have this text put into a label for each title.

Is there a way I can just put the text into a cell and therefore be able to
just link that info via reference to the page the text was originally put in?
In other words, how do I programmatically just put text into a cell, instead
of using a label?

Any help will be greatly appreciated!
--
Sandy



All times are GMT +1. The time now is 05:37 PM.

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