program for dialog box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have attached a link to a picture of the dialog box in which i need some
programming wrote for.
http://img178.imageshack.us/img178/2478/dialogboxnt2.jpg
i need to have a button on my page that will bring up this dialog box.
next i will enter the info. after clicking ok it will insert my info into
the active cell i have chosen before activating the command.
for instance i have chosen cell A1. i have entered in my box "B" for letter
and 11 for start and 23 for finish.
result would be A1=B11, B1=B12, C1=B13...
i hope i have been clear enough on what i am looking for.
thank you for your time.
 
i have figured it out with the help of a friend.


Private Sub cmdOK_Click()
ActiveCell.FormulaR1C1 = letter + startnumber
Dim rowcount As Integer
rowcount = finishnumber - startnumber
Do While rowcount > 0
startnumber = startnumber + 1



ActiveCell.Offset(1, 0).Select
If startnumber < 10 Then

ActiveCell.FormulaR1C1 = letter + "0" + startnumber

Else
ActiveCell.FormulaR1C1 = letter + startnumber
End If

rowcount = rowcount - 1
Loop
End


Hide
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top