Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am not sure if posting code is a faux pas, but it is a really simple one.
Even though it crashes everytime I run it...Why? Thanks in advance, Yo. Sub explainLocations() Dim wbL As Workbook, wbT As Workbook Dim wsT As Worksheet, wsL As Worksheet Dim rT As Range, rE As Range, rW As Range Dim rC As Range, rL As Range Dim swb As String Set wbL = Workbooks(ActiveWorkbook.Name) Set wsL = Worksheets(wbL.ActiveSheet.Name) Set rL = wsL.Range("B1", Range("B1").End(xlToRight).Address(0, 0)) For Each rC In rL.Cells Set rW = Range(c.Address(0, 0)) swb = "C:\Documents and Settings\Me\Desktop\Web\" & wsL.Name & "\" & rC.Value Set wbT = Workbooks.Open(swb) Set wsT = Worksheets(wbT.ActiveSheet.Name) Set rT = wsT.Range("A1", Range("B1000").End(xlUp).Address(0, 0)) For Each rE In rT.Cells If rE.Font.Underline = "2" Then Set rW = rW.Offset(1, 0) rW.Value = rE.Value End If Next Set wsT = Nothing Set rT = Nothing wbT.Close Set wbT = Nothing Next Set rW = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vlookup not working consistently | Excel Worksheet Functions | |||
How do I get filtering to behave consistently? | Excel Worksheet Functions | |||
Code crashes after clearing comments | Excel Worksheet Functions | |||
CPU Usage consistently above 75% | Excel Discussion (Misc queries) | |||
Code in ThisWorkbook crashes Excel | Excel Programming |