Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
Por Martins
Posts
#49153
Boa tarde.

Eu tenho uma macro que cria linhas em branco cujo número é definido em um imputbox.

Alguém conseguem me ajudar para que a quantidade de linhas também seja alimentada por meio de um imptbox?


Sub linha()

Dim rowNum As Integer
On Error Resume Next

rowNum = Application.InputBox(Prompt:="Enter Row Number where you want to add a row:", _
Title:="Kutools for excel", Type:=1)
Rows(rowNum & ":" & rowNum).Insert Shift:=xlDown

End Sub
Por GabrielBulhosa
#49154
Sub linha()

Dim rowQtd As Integer
Dim i As Integer
Dim rowNum As Integer
On Error Resume Next

rowNum = Application.InputBox(Prompt:="Enter Row Number where you want to add a row:", _
Title:="Kutools for excel", Type:=1)

rowQtd = Application.InputBox(Prompt:="Informe a quantidade de linhas:", _
Type:=1)

For i = 1 To rowQtd
Rows(rowNum & ":" & rowNum).Insert Shift:=xlDown
Next i

End Sub
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord