Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I've had a couple of replies to my earlier question but unfortunately the solutions do not work. The code runs through the loop and converts my formula to values for the first worksheet but when it gets to next sht, the code is not selecting the next sheet in the workbook. In stepping through I've noted the value of my variable sht = nothing. Surely I must need to set this to something. I'm confused. Can anyone help? My code is below. Many thanks Jacqui Dim iCnt As Integer Dim sRTitle As String Dim sht As Worksheet ActiveWindow.SelectedSheets.Copy ActiveWindow.Caption = "ERS-Formula to value" Application.StatusBar = "Converting formula to values" iCnt = Worksheets.Count For Each sht In ActiveWorkbook.Worksheets EndRow = Range("A65000").End(xlUp).Row + 1 iCCount = Range("IV7").End(xlToLeft).Column Range("A1", Cells(EndRow, iCCount)).Select Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Next sht |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Code Not Working | Excel Discussion (Misc queries) | |||
VBA Code Not Working | Excel Discussion (Misc queries) | |||
Code not working as expected. | Excel Discussion (Misc queries) | |||
VB Code Is Not Working | Excel Discussion (Misc queries) | |||
Code not working and can't see why | Excel Discussion (Misc queries) |