View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Option Button with VB code, not working

You are only at 2 strikes and you have learned 2 things. Not a bad day in my
books...
--
HTH...

Jim Thomlinson


"Susan" wrote:

3 strikes & i'm out.................
:)
susan


On Jul 25, 3:50 pm, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
There is no issue with deleteing non-consecutive rows... This works just
fine...

Sub test()
Range("3:5, 7:10").Delete
End Sub
--
HTH...

Jim Thomlinson



"FSt1" wrote:
hi
i thinks that is because you are trying to delete non consecutive rows. no
can do.
you can delete groups of rows but not non consecutive.


regards
FSt1


"pgarcia" wrote:


Will, it stops at "If OptionButton2.Value = True Then" and it will not
continue from there. This is the full code.


Sub Copy_Paste_AR()
'
Application.ScreenUpdating = False


Sheets("AR").Visible = True


Dim MyPath As String
Dim MyFileName As String


Sheets("AR").Select
Range("H1:H187", Range("H1:H187").End(xlDown)).Copy
Range("H1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False


Columns("A:G").Delete Shift:=xlToLeft


Sheets("INPUT_A").Select
If OptionButton2 Then
Call AR_GTD
ElseIf OptionButton3 Then
Call AR_Both
ElseIf OptionButton4 Then
Call AR_ECO
End If


Sheets("AR").Select
Range("A1").Select


MyPath = "S:\SUPPORT\CADTAR\CMS\!Exported_Text_Files!\"
MyFileName = "d" & Sheets("INPUT_A").Range("C8").Value & "ar"


ActiveWorkbook.SaveAs Filename:=MyPath & MyFileName, _
FileFormat:=xlText, CreateBackup:=False


Sheets("INPUT_A").Select
MsgBox ("AR file has been created at:" & vbLf &
"S:\SUPPORT\CADTAR\CMS\!Exported_Text_Files!\" )


End Sub- Hide quoted text -


- Show quoted text -