![]() |
Macro that worked stopped working
I have the following that has worked for months and now has stopped? Is
there some limit? It basically takes a number (Fixed digits like 1234 + a calculated part) and pastes it into a cell. Sheets("Serial Number Log").Select Range("A1").End(xlDown).Offset(1, 0).Select Sheets("DO NOT DELETE").Select Range("G54").Select Selection.Copy Sheets("Serial Number Log").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False ActiveCell.Offset(0, 23).Copy ActiveWindow.ScrollWorkbookTabs Position:=xlFirst Sheets("Work Order Form").Select Range("H25").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False |
Macro that worked stopped working
I'm not sure why it stopped??
But I think that this does the same thing. Dim NextCell as range with worksheets("serial number log") set nextcell = .range("A1").end(xldown).offset(1,0) end with nextcell.value = worksheets("do not delete").range("g54").value worksheets("work order form").range("H25").value = nextcell.offset(0,23).value Freddy wrote: I have the following that has worked for months and now has stopped? Is there some limit? It basically takes a number (Fixed digits like 1234 + a calculated part) and pastes it into a cell. Sheets("Serial Number Log").Select Range("A1").End(xlDown).Offset(1, 0).Select Sheets("DO NOT DELETE").Select Range("G54").Select Selection.Copy Sheets("Serial Number Log").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False ActiveCell.Offset(0, 23).Copy ActiveWindow.ScrollWorkbookTabs Position:=xlFirst Sheets("Work Order Form").Select Range("H25").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False -- Dave Peterson |
Macro that worked stopped working
Try this. Keep in mind it has no error checking in it if the worksheets
don't exist. Option Explicit Sub Test() Dim myWB As Excel.Workbook Dim myWS As Excel.Worksheet Dim mySourceWS As Excel.Worksheet Dim myRange As Excel.Range Set myWB = ThisWorkbook Set myWS = myWB.Sheets("Serial Number Log") Set myRange = myWS.Cells(1, 1).End(xlDown).Offset(1, 0) Set mySourceWS = myWB.Sheets("DO NOT DELETE") mySourceWS.Range("G54").Copy myRange.PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, _ SkipBlanks:=False, _ Transpose:=False myRange.Offset(0, 23).Copy With myWB.Sheets("Work Order Form").Range("H25") .PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, _ SkipBlanks:=False, _ Transpose:=False End With End Sub Untested! HTH, Barb Reinhardt "Freddy" wrote: I have the following that has worked for months and now has stopped? Is there some limit? It basically takes a number (Fixed digits like 1234 + a calculated part) and pastes it into a cell. Sheets("Serial Number Log").Select Range("A1").End(xlDown).Offset(1, 0).Select Sheets("DO NOT DELETE").Select Range("G54").Select Selection.Copy Sheets("Serial Number Log").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False ActiveCell.Offset(0, 23).Copy ActiveWindow.ScrollWorkbookTabs Position:=xlFirst Sheets("Work Order Form").Select Range("H25").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False |
All times are GMT +1. The time now is 10:12 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com