ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   program for dialog box (https://www.excelbanter.com/excel-programming/383574-program-dialog-box.html)

Brian

program for dialog box
 
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/2...alogboxnt2.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.



--
Thank You in advance, Brian

Brian

program for dialog box
 
srry the first link is too small to view. try this one.
http://img184.imageshack.us/img184/7...alogboxly4.jpg
--
Thank You in advance, Brian


"Brian" wrote:

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/2...alogboxnt2.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.



--
Thank You in advance, Brian


Brian

program for dialog box
 
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
--



"Brian" wrote:

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/2...alogboxnt2.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.



--
Thank You in advance, Brian



All times are GMT +1. The time now is 09:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com