Locked.
Reason: Duplicate Post
Please read forum rules
http://www.excelforum.com/showthread...76#post1802176
I currently have workbook with multiple worksheets (tabs), each tab is named after cell “A1” by utilizing the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Not IsEmpty(Target.Value) Then
ActiveSheet.Name = Target.Value
End If
End If
End Sub
Then I have in another the code listed below:
Sub loads4()
'
'Sub Loads #4'
'
Dim filevalue
filevalue = Cells(135, 5).Value
'L Load'
Range("K136").Value = "=" & filevalue & "!K95"
'R Load'
Range("K137").Value = "=" & filevalue & "!K96"
'E Load'
Range("K138").Value = "=" & filevalue & "!K97"
'K Load'
Range("K139").Value = "=" & filevalue & "!K98"
'S Load'
Range("K140").Value = "=" & filevalue & "!K99"
End Sub
This allows me to get information from additional tabs by just entering the tab name “filevalue” and running the associated macro. The problem is that whenever I use the “-“symbol excel has a problem with it, and I need it for my sheet titles, is there a way to modify the VBA to change any “-“symbols to “.” When labeling the tab from the information from the cell indicated. The “.” Allows the macro to work but for some reason when I use the “-“everything goes haywire. Thanks in advance.
Bookmarks