New to Macros , Please help.

ashokpandian

New Member
Joined
Jan 13, 2016
Messages
4
Hi All,

Sub SavePDF()
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="D:\Users\51441884\Desktop\Tracking tool\CAPA Form.pdf", _
OpenAfterPublish:=True
End Sub
Sub Copier()
Dim x As Integer
x = InputBox("Enter number of times to copy Sheet1")
For numtimes = 1 To x
ActiveWorkbook.Sheets("CAPA Form").Copy _
After:=ActiveWorkbook.Sheets("CAPA Form")
Next
ActiveWorkbook.Save
End Sub



This is the code i have in my worksheet but its not working.


My Requirement is simple. I need to populate the same type of form again and again in the same excel.

Sheet1- Registration Form (To enter the Form1 details and so on)
Sheet2-General Form (This form should be populate again and again depends on the information which entered in the sheet1 or Simply just populate again and again so that i will enter it manually)


Please explain with some example so that i can modify code for my requirement.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
ashokpandian

You need to explain to us in detail what your wanting to do.
This script has to do with copying sheets not inputting data to a sheet.
 
Upvote 0
ashokpandian,

You might try adding the line...
Code:
[COLOR=#a9a9a9]
Sub Copier()

Dim x As Integer
[/COLOR][B]Dim numtimes As Integer[/B][COLOR=#a9a9a9]

[/COLOR]
Cheers,

tonyyy
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,947
Members
449,480
Latest member
yesitisasport

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top