Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need a bit of help, obviously. I want to retrieve a data value from a cell
which is the NAME of a worksheet. I want to integrate that retrieved value into the VB code to either HIDE or UNHIDE the sheet. I have this: Dim code As Integer code = Worksheets("HOME").Range("C4").Value '(which equals 160628)' I want to take that value of 160628 and get it into this type of code replacing the "HOME" section: Sheets("HOME").Visible = True Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A couple of things... Change your int to Long... That number is too large...
then Dim code As Long code = Worksheets("HOME").Range("C4").Value Sheets(Format(code, "0")).Visible = True -- HTH... Jim Thomlinson "Mark Warner" wrote: I need a bit of help, obviously. I want to retrieve a data value from a cell which is the NAME of a worksheet. I want to integrate that retrieved value into the VB code to either HIDE or UNHIDE the sheet. I have this: Dim code As Integer code = Worksheets("HOME").Range("C4").Value '(which equals 160628)' I want to take that value of 160628 and get it into this type of code replacing the "HOME" section: Sheets("HOME").Visible = True Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oh perfect!! Thanks...
Now to make it more fun...what if instead of 1 value in one cell, I have several values in several cells and I want to do the same thing...i.e. bring the value into the code and unhide several sheets..like 10 of them? "Mark Warner" wrote: I need a bit of help, obviously. I want to retrieve a data value from a cell which is the NAME of a worksheet. I want to integrate that retrieved value into the VB code to either HIDE or UNHIDE the sheet. I have this: Dim code As Integer code = Worksheets("HOME").Range("C4").Value '(which equals 160628)' I want to take that value of 160628 and get it into this type of code replacing the "HOME" section: Sheets("HOME").Visible = True Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Integrating xls with vba | Excel Programming | |||
Integrating a work sheet into another | Excel Discussion (Misc queries) | |||
integrating row number in a formula | Excel Programming | |||
Integrating variables in formulas in VB??? | Excel Programming | |||
URGENT !!! Integrating Axes | Charts and Charting in Excel |