Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is most likely no translated for the post!





Hello, i have a que...
 
Share:
Notifications
Clear all

Hello, i have a question about visual basic.


(@rdiizz)
Active Member
Joined: 4 months ago
Posts: 9
Topic starter  

 

So basicly i have code : its 2 dimensional masive

Dim x As Integer, y As Integer
x = InputBox("Rows!", "ceturtaislabors", "10")
y = InputBox("colons!", "ceturtaislabors", "10")
b = 2
j = y
d = y
a = 1
For i = 1 To x Step 1
Cells(j, i) = a
a = a + 2
j = j + 1
Next
For i = 2 To x Step 1
Cells(d, i) = b
b = b + 2
d = d + 1
Next
End Sub

which makes my thingy go likes this, it starts from 10th row, but i have to make it start from 1st row? Any recomendatios?

its suppost to look like in the last pic, how can i move  it up? :D

 

This topic was modified 4 months ago 3 times by rdiizz

ReplyQuote
Topic Tags
 Hans
(@hans)
Noble Member Admin
Joined: 8 years ago
Posts: 1767
 

I think, while taking a quick glance at it (I don't know what numbers you entered for x and y - I assume 10 for both) that you have to change this:

j = y
d = y

to

j = 1
d = 1

 


lino liked
ReplyQuote
(@rdiizz)
Active Member
Joined: 4 months ago
Posts: 9
Topic starter  

Thank you very much :)


ReplyQuote
 Hans
(@hans)
Noble Member Admin
Joined: 8 years ago
Posts: 1767
 

Did it work? 😊 


ReplyQuote
 lino
(@lino)
Active Member
Joined: 4 months ago
Posts: 10
 

@hans i have tried. Work 🤣 


ReplyQuote



 Hans
(@hans)
Noble Member Admin
Joined: 8 years ago
Posts: 1767
 

👍  Cool!


ReplyQuote

Like what you see and you'd like to help out? 

The best way to help is of course by assisting others with their questions here in the forum, but you can also help us out in other ways:

- Do your shopping at Amazon, it will not cost you anything extra but may generate a small commission for us,
- send a cup of coffee through PayPal ($5, $10, $20, or custom amount),
- become a Patreon,
- donate BitCoin (BTC), or BitCoinCash (BCH).

Share: