LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Insert Row Specified Sheet

i have 3 Checkboxes, If Checkbox 1 is Selected Then i need to Insert
a Row on That Sheet
If 2 is Selected then i need Insert a row on that page
If 3 is Selected then i would insert a row on that page.
Here is what i have but i think im a bit far off.... Never Have done
Much Programming in vba
any help would be Greatly appreciated
or Even a Shorter Row of doing this would be much appreciated..


Private Sub CmdCreate_Click()
Dim Row As Integer
Dim MyPage = Array("Sheet1","Sheet2","Sheet3")

If CkBoxShelter.Value = False And CkBoxDep.Value = False And
CkBoxTPR.Value = False Then
MsgBox "Please Select The Type", vbOKOnly
End If

If CkBoxDep.Value = True Then
MyPage(1).Activate
End If

If CkBoxTPR.Value = True Then
MyPage(2).Activate
End If

' Insert data into Excel.
With excel_app

.Rows("6:6").Select ' Insert Row
Selection.Insert Shift:=xlDown
Row = 6
Range("A" & Format$(Row)).Select
ActiveCell.FormulaR1C1 = TxtCaseName.Text

End With
Unload Me
FSearch.Show

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert sheet tab is not functioning and can't add new sheet LoLo Excel Worksheet Functions 5 April 2nd 23 07:06 PM
Insert Sheet Karthik Excel Worksheet Functions 2 March 13th 09 06:34 AM
insert row on next sheet leonidas[_24_] Excel Programming 0 June 28th 06 09:58 AM
insert query into excell sheet to update excell sheet and pivot table vbsolo Excel Discussion (Misc queries) 0 August 24th 05 12:41 PM
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B Hannes Heckner Excel Programming 1 March 5th 04 09:10 AM


All times are GMT +1. The time now is 06:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"