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 no translation for that post!



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

[Solved] Hello, i have a question about visual basic.

6 Posts
3 Users
1 Likes
1,039 Views
(@rdiizz)
Active Member
Joined: 4 years 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 years ago 3 times by rdiizz

   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2703
 

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 reacted
ReplyQuote
(@rdiizz)
Active Member
Joined: 4 years ago
Posts: 9
Topic starter  

Thank you very much :)


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2703
 

Did it work? 😊 


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

@hans i have tried. Work 🤣 


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2703
 

👍  Cool!


   
ReplyQuote
Share: