Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm having trouble with a couple things.
Dim range1 as string Range1 = "Worksheets(""" & WS & """).Range(""" & "B91:B" & g & """)" I built a string that gives a complete range but when I try to plug it in it fails: MsgBox Application.WorksheetFunction.Sum(Range1) with msgbox Range1 I can see it's a complete string. Why is it failing? Another thing is I have a bunch of labels on a form for days of the month and one for balances on that day. The labels on the form called Balance1 are called D1, D2, D3, ...D31 and the balances are called B1, B2...B31 on the worksheet, I'm pulling a day(selection.value) to get 30 for example and want to transfer the balance say two cells over to B30. Is there a way to do that rather than a large Select Case hardcoding the day L1 = "B" & Day(selection.value) Set Lab1 = Balance1.Controls(L1).Caption 'MsgBox "Caption: " & Balance1.Controls(Lab1).Name how do I make it show Balance1.Controls(Lab1).Name = selection.offset(-2,0).value |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find and replace numeric strings in larger text strings | Excel Worksheet Functions | |||
converting text strings into dates | Excel Worksheet Functions | |||
converting concatenated text strings into formulas | Excel Worksheet Functions | |||
Converting variable text strings to numeric | Excel Discussion (Misc queries) | |||
Problem with copying variable(s) to cell(s) and converting strings to mixed case | Excel Programming |