ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   EntireRow.Delete, Causes Problems In ComboBox In Another Workbook (https://www.excelbanter.com/excel-programming/350119-entirerow-delete-causes-problems-combobox-another-workbook.html)

Raleigh

EntireRow.Delete, Causes Problems In ComboBox In Another Workbook
 
With ActiveSheet
LastRow = .UsedRange.Rows.Count
.Range(.Cells(FirstRow, 1), .Cells(LastRow, 1)).EntireRow.Select
End With

This line performs the tasks that it is asked but it erases other values
contained in a combobox in another workbook.

Yngve

EntireRow.Delete, Causes Problems In ComboBox In Another Workbook
 
Hi Raleigh
try this

Sub a()


With ActiveSheet
Dim LastRow As Double
'countt columns A
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Rows("1:" & LastRow).Select

End With
End Sub

Regards Yngve


Raleigh

EntireRow.Delete, Causes Problems In ComboBox In Another Workb
 


"Yngve" wrote:

Hi Raleigh
try this

Sub a()


With ActiveSheet
Dim LastRow As Double
'countt columns A
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Rows("1:" & LastRow).Select

End With
End Sub

Regards Yngve



Thank you I am going to try it out right now.

Raleigh

EntireRow.Delete, Causes Problems In ComboBox In Another Workb
 


"Raleigh" wrote:



"Yngve" wrote:

Hi Raleigh
try this

Sub a()


With ActiveSheet
Dim LastRow As Double
'countt columns A
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Rows("1:" & LastRow).Select

End With
End Sub

Regards Yngve



Thank you I am going to try it out right now.


I am so sorry in the initial function there was an 'EntireRow.Delete' not an
'EntireRow.Select' so it would have looked like this..

With ActiveSheet
LastRow = .UsedRange.Rows.Count
..Range(.Cells(FirstRow, 1), .Cells(LastRow, 1)).EntireRow.Delete
End With

Should I still just make and attempt with the code you gave me and just
switch 'delete' with 'select'?



All times are GMT +1. The time now is 12:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com