Sub link()

Dim k As Integer
Dim rand As Integer
Dim URL As String
Dim foldernum As Integer
Dim folderstring As String
Dim filenum As Integer
Dim filestring As String


k = 1
'for AC Numbers
For i = 11 To 40

foldernum = 0
foldernum = 1000 + i
folderstring = CStr(foldernum)
folderstring = Mid(folderstring, 2, 3)
folder = "ac" & folderstring

'folderstring = Sheets(2).Cells(i, 1)
' for Number of Random files

For j = 1 To 10

rand = Int(Rnd * (200 - 1) + 1)




filenum = 0
filenum = 1000 + rand
filestring = CStr(filenum)
filestring = Mid(filestring, 2, 3)

'URL = "http://ceobihar.nic.in/PSCDROM/ac" & folderstring &
"/i" & folderstring & "0" & filestring & ".pdf"
URL = "http://www.elections.tn.gov.in/pdfs/dt1/" & folder &
"/" & folder & filestring & ".pdf"
' URL
=http://www.wb.nic.in/wbeco/EROLLS/PDF/English/A001/a0010105
.pdf



Cells(k, 1) = folderstring
Cells(k, 2) = folder
Cells(k, 3) = filestring
Cells(k, 3) = URL
k = k + 1
Next j





Next i



End Sub
plz define it


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More VB Script Interview Questions

1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 how to find using vbscripting

3 Answers  


what is diff b/n these 2 programs 1) for i=5 to 1 step 2 msgbox "pass" next 2_) for i=5 to 1 step -2 msgbox "pass" next

5 Answers   Hexaware,


hai..friends ....what is the difference between function and sub procedure ....here every one know's theoretically here my question is what is the meaning of function can return the value and sub can't return the value...can you give one example with some values for that ....what does it mean ? how function can return the value...sub can not...any one please...........with example

1 Answers   Cap Gemini,


How to insert snapshot during manual scripting in QTP?

1 Answers  


Write VB script to convert from feet to inches(hint 1feet=12 inches)

2 Answers  






What are the different types of operators and their order of precedence?

0 Answers  


i need to login to my yahoo accoutnt using VB Script, automating the operation of webobjects, even launching of IE. How?

1 Answers   Mphasis,


Hi, Anybody could you Please tell me How to write the script for Checking whether given number is Prime Number or not..Thanks in Advance

6 Answers   Amazon,


How to pass the parameter from one function to another function in VB Scripting?

1 Answers   Fastenal,


write a vb script to display factorial of a number using function

1 Answers  


What are the environments supported by vbscript language?

0 Answers  


How can I write HTML text to the window in VB Script?

2 Answers  


Categories