Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

qbasic to vba excel

bond306bond306 Posts: 2Member
can anyone help me converting the qbasic code below to macros in excel... especially the Read and Data part... it seems that macros in excel doesnt read Read and data statment... Thanks you =)

1010 X = 263.08: Y = 36.855: Z = 1244.142
1020 FOR K = 2 TO 6
1030 READ H(K), L(K), N(K), A(K), B(K), C(K), D(K)
1040 NEXT K
1050 DATA 142.50,41.667,1.818E-5,-0.3022,3.6278,-13.6641,16.8309
1060 DATA 168.87,40.404,9.34E-3,-0.4050,3.8471,-12.3389,13.6921
1070 DATA 179.21,39.781,1.139E-6,-0.1124,1.3282,-5.1423,6.8403
1080 DATA 188.78,39.273,8.60E-8,-0.1611,1.9007,-7.3019,9.5072
1081 DATA 162.02,41.712,0.7803,-0.2427,2.1504,-6.6100,7.4294
1090 FOR K = 2 TO 6
1100 Q = X
1110 FOR I = 1 TO 600
1120 Q = Q + .1
1130 P(I) = Q
1140 TE = H(K) / P(I) - 1
1150 S(K, I) = L(K) * TE + Y * TE * TE
1160 S(K, I) = EXP(S(K, I))
1170 S(K, I) = S(K, I) * N(K) * Z
1180 IF V = 0 THEN GOSUB 2000
1185 S(K,I) = S(K,I) * PP
1190 S(K, I) = S(K, I) * CORR
1200 NEXT I: NEXT K
1210 RETURN
Sign In or Register to comment.