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: 414
Default add vbyesno to existing macro

Morning all.
I have a macro that I want to add a continuation element to.
Presently the macro copies a cell's contents down to the end of my choosing
with an input box. I'd like to add a message box input to continue the
operation into multiple columns.
How do I call the macro to continue?
My code for the macro:
--------------------------------------------------------
Sub ClaimN() '(control As IRibbonControl) have commented out iribbon control
' for testing until it works with addition of continuation input.
'select cells with date, or claim number, and copy to
'next row used for that data.
Dim Nu As Integer
Nu = InputBox(prompt:="How many rows is your Abstract Sheet?",
Title:="Number of Rows")



Application.ScreenUpdating = False
For i = 1 To Nu

Selection.Copy


ActiveCell.Offset(rowoffset:=4, columnoffset:=0).Select

ActiveSheet.Paste
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
.Font.Bold = False

End With

With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
End With


Next i

'here starts my input message box to select next column

Dim msg 'used example out of VB help file.

msg = MsgBox("do you wish to select next column?", vbYesNo, "Select Next_
Column")
If msg = vbYes Then

'what do I place here to start the macro over again?
'I want to select one column over, and have it repeat the same as
'already performed.
'I then want to repeat this as many times as I choose.


Else
msg = vbNo
End Sub

End If

ActiveWorkbook.Save

End Sub
--------------------------------------------------

Thank you for your helps.
Best.
SteveB
 
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
vbyesno msgbox matt3542 Excel Programming 6 August 29th 08 09:57 AM
msgbox text vbyesno Curt Excel Programming 4 July 18th 07 04:20 PM
vbYesNo message box Big Mac Excel Programming 5 May 9th 06 02:42 PM
VbYesNo Msg Box mjack003 Excel Discussion (Misc queries) 1 September 22nd 05 03:09 AM
vbYesNo mike allen Excel Programming 1 January 4th 04 03:59 PM


All times are GMT +1. The time now is 05:05 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"