Home > Software engineering >  Vba circulation assignment
Vba circulation assignment

Time:09-22

U1 is supposed to be a column vector, there are 3250 elements, there are questions, compile the last sentence is likely to be 'Cells ()' and 'U1 (3100-3249) "here has a problem, seek advice

 Dim U1 () As a Double 
Ret=SapModel. Results. JointDispl (" 2 ", ObjectElm NumberResults, Obj, Elm, LoadCase, StepType, StepNum, U1, U2, U3, R1, R2, R3)
Sheet7. Cells (1 + 150 * ((I - 1) + (j - 1) + iT0 iT0 * * ia0 * (k - 1)) : 150 + 150 * ((I - 1) + (j - 1) + iT0 iT0 * * ia0 * (k - 1)), I). The Value=https://bbs.csdn.net/topics/Application.WorksheetFunction.Transpose (U1 (3100:3249))


I want to put the array after each cycle of U1 3100-3249 elements to Sheet7 1 + 150 * ((I - 1) + (j - 1) + iT0 iT0 * * ia0 * (k - 1)) to 150 + 150 * ((I - 1) + (j - 1) + iT0 iT0 * * ia0 * (k - 1)), the column there, I could you tell me how to express the ah, the vba is not ripe, express has a problem, ask for advice

CodePudding user response:

Break down into smaller steps can help debugging,

CodePudding user response:

 Dim sAddress As String 
Dim U1Sub () As a Double
'you need to make a copy of a subset of the set of U1 into a single array U1Sub'
SAddress=Sheet7. Cells (1 + 150 * ((I - 1) + (j - 1) + iT0 iT0 * * ia0 * (k - 1)), I). The Address
SAddress=sAddress & amp; ":" & amp; Sheet7. Cells (150 + 150 * ((I - 1) + (j - 1) + iT0 iT0 * * ia0 * (k - 1)), I). The Address
Sheet7. Range (sAddress). Value=https://bbs.csdn.net/topics/Application.WorksheetFunction.Transpose (U1Sub)
  •  Tags:  
  • VBA
  • Related