Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I have a series of Case Statements which will write to a report sheet. I then want to copy the sheet to a new workbook. I have placed the command Sheets("Report").Copy in various places, but it does nothing. Any suggestions as to what I am doing wrong? Private Sub ComboBox1_click() Dim i As Long, rng As Range Dim refrange As Range Dim c As Range ComboBox2.ListIndex = -1 ComboBox3.ListIndex = -1 ComboBox4.ListIndex = -1 ComboBox5.ListIndex = -1 Select Case ComboBox1.Value Case "GSOP_0286" Sheets("Report").Range("A4:I20").Clear Set refrange = Sheets("Sheet2").Range("A3:A20") i = 0 For Each c In refrange If c.Value = "" Then End Else s = Replace(c.Formula, "=", "") Set rng = Evaluate(s) rng.EntireRow.Copy Sheets("Report").Range("A4") _ .Offset(i, 0) _ .PasteSpecial Paste:= _ xlPasteAll, _ Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False i = i + 1 End If Next c [More Case Statements] End Select Sheets (€śReport€ť).Select Sheets (€śReport€ť).Copy Thanks, -- Brian McCaffery |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel "Move or Copy" and "Delete" sheet functions | Excel Worksheet Functions | |||
problem with Linking workbooks via "copy" and "paste link" | Excel Discussion (Misc queries) | |||
Set sem__ = Sheets("template").Copy(befo=Sheets(1)) | Excel Programming | |||
Auto "copy and paste" individual cells from various sheets into one sheet ?? | Excel Discussion (Misc queries) | |||
"With Sheets" Issue - macro on one sheet to affect hidden rows on other sheets | Excel Programming |