當前位置:編程學習大全網 - 人物素材 - 哪位大師告訴我,如何把設計好的excel計算器表格用到VB裏面啊

哪位大師告訴我,如何把設計好的excel計算器表格用到VB裏面啊

哪位大師告訴我,如何把設計好的excel計算器表格用到VB裏面啊

多些壹舉,直接在VB中呼叫系統自帶的計算器就行了。

為什麽要用excel設計計算器呢?

哪位大俠可以告訴用VB或VC寫壹個計算器的原始碼啊?

想學加我QQ452362812,VB方法實現。

如何用Excel設計自己的計算器

方法壹,在單元格中寫入計算式直接得出結果

在EXCEL中

加號為+

減號為-

乘號為*

除號為/

乘冪為^

等號為=

在電子表格中直接寫入帶等號的計算式,就會計算出值

如計算2+3乘以5再除以7的結果的兩次方,公式可以寫成

=((2+6)*5/4)^2

按下回車即可得值為100

方法二

在各單元格中分別寫入要計算的數值,再用公式(或函式公式)進行計算

EXCEL四則運算

以A1至A5單元格區域及B6單元格為例,A1至A5分別為1,2,3,4,5,B6為6

加法

=SUM(A1:A5,B6)

=A1+A2+A3+A4+A5+B6

A1至A5及B6相加 值為21

減法

=SUM(A1:A5)-B6

=A1+A2+A3+A4+A5-B6

A1至A5相加減去B6 值為9

乘法

=PRODUCT(A1:A5,B6)

=A1*A2*A3*A4*A5*B6

A1至A5及B6相乘 值為720

除法

=PRODUCT(A1:A5)/B6

=A1*A2*A3*A4*A5/B6

A1至A5相乘除去B6 值為20

計算乘冪值,比如要計算A2單元格值為底,A3單元格值為冪次指數的值(即2的3次方)

則公式為

=A2^A3

=POWER(A2,A3)

即為2的3次方=8

輸入公式的單元格不能是在公式中已被引用的單元格,以免形成回圈計算

表格的頂上是壹排字母A,B,C,.......這個就是列標

表格的左邊是壹豎列的數字1,2,3,.......這個就是行號

列標加上行號就是就是單元格的名稱,單元格名稱也叫做單元格地址,如A列的第三行,為A3單元格,C列的第18行為C18單元格,第五列的第七行就是E7單元格,這樣形成了壹個個的座標,標明了每個單元格的位置.

求公路Excel設計好的計算表樣

需要計算什麽?建議樓主自己設計出樣表,然後到:exceltip./?fromuid=2我的提問版面求助,把需要計算的單元格和資料關系說明壹下,自然有人幫妳。

本人也曾做多年高速公路施工。

請哪位大師 告訴我壹下 古建築的向量圖 如何設計啊 用PS和CorelDraw

網上有許多的,這個素材妳工作時壹般都是用現成的為好,老板不會讓妳慢慢自己設計的,除非是個大單子,人家完全要求根據實際創作壹種獨特風格的。小價格的單子,每個元素都原創,妳家老板會發瘋咬妳的。

求大神告訴我x+1/(x^2)求導計算器怎麽按(991的計算器)

991只能求某壹點的導數值,不能求導函式

如何鎖定設計好的EXCEL表格,讓其他人只能在表格裏填寫內容,不能修改設計好的表格屬性和調整大小?

“工具”/“保護”/“保護工作表”

然後設定密碼及相關修改許可權即可。

哪裏有房貸的計算器啊 有誰告訴我呢

各家銀行網站上都有。

求助高手,DELPHI計算器設計的流程圖,哪位知道,告訴我呀,非常感謝!

這是原始碼:

unit Unit1;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, Buttons, StdCtrls, ExtCtrls;

type

TForm1 = class(TForm)

Panel1: TPanel;

Panel2: TPanel;

SpeedButton7: TSpeedButton;

SpeedButton8: TSpeedButton;

SpeedButton9: TSpeedButton;

SpeedButton13: TSpeedButton;

SpeedButton4: TSpeedButton;

SpeedButton5: TSpeedButton;

SpeedButton6: TSpeedButton;

SpeedButton12: TSpeedButton;

SpeedButton1: TSpeedButton;

SpeedButton2: TSpeedButton;

SpeedButton3: TSpeedButton;

SpeedButton11: TSpeedButton;

SpeedButton14: TSpeedButton;

SpeedButton15: TSpeedButton;

SpeedButton10: TSpeedButton;

StaticText1: TStaticText;

SpeedButton0: TSpeedButton;

SpeedButton16: TSpeedButton;

SpeedButton17: TSpeedButton;

GroupBox1: TGroupBox;

procedure SpeedButton1Click(Sender: TObject);

procedure FormCreate(Sender: TObject);

procedure SpeedButton11Click(Sender: TObject);

procedure SpeedButton15Click(Sender: TObject);

procedure SpeedButton16Click(Sender: TObject);

procedure SpeedButton17Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form1: TForm1;

restart: Boolean;

isfirst: Boolean;

fir_num,sec_num: String;

sign: integer;

result: real;

save: String;

implementation

{$R *.dfm}

function count(sign: integer):real;

begin

case sign of

1: result:=strtofloat(fir_num)+strtofloat(sec_num); 為加號時

2: result:=strtofloat(fir_num)-strtofloat(sec_num); 為減號時

3: result:=strtofloat(fir_num)*strtofloat(sec_num); 為乘號時

4: begin

try

result:=strtofloat(fir_num)/strtofloat(sec_num); 為除號時

except

ShowMessage('錯誤!');

form1.close;

end; 除數為0時,做出異常處理

end;

end;

end;

procedure TForm1.SpeedButton1Click(Sender: TObject);

var

i: integer;

begin

if restart then 如果是重新開始輸入,則清除原來的運算元,並設定isfirst為True

begin

isfirst:=True;

fir_num:='';

sec_num:='';

restart:=False;

end;

if isfirst then 如果是第壹個運算元

begin

if (sender as TSpeedButton).Caption='.' then 如果輸入的是小數點

begin

if (strlen(pChar(fir_num))<=0) then 如果第壹個運算元並未輸入

fir_num:='0.'

else

for i:= 1 to strlen(pChar(fir_num)) do

if fir_num[i]='.' then exit;

如果第壹個中已含有小數點而又輸入小數點,則退出

end;

if (strlen(pChar(fir_num))>0) and (fir_num[1]='0') then 如果最高位為0

begin

if ((sender as TSpeedButton).Caption='.') then

fir_num:='0.'

else

begin

if strlen(pChar(fir_num))>1 then 如果是小數,則繼續輸入

fir_num:=fir_num+(sender as TSpeedButton).Caption

else

fir_num:=(sender as TSpeedButton).Caption;

如果不是小數,則去掉最高位的0

end;

end

else

fir_num:=fir_num+(sender as TSpeedButton).Caption;

StaticText1.Caption:=fir_num;

end

else

begin

if (sender as TSpeedButton).Caption='.' then 如果第二個運算元並未輸入

begin

if (strlen(pChar(sec_num))<=0) then

sec_num:='0.'

else

for i:= 1 to strlen(pChar(sec_num)) do

if sec_num[i]='.' then exit;

如果第二個中已含有小數點而又輸入小數點,則退出

end;

if (strlen(pChar(sec_num))>0) and (sec_num[1]='0') then 如果最高位為0

begin

if ((sender as TSpeedButton).Caption='.') then

sec_num:='0.'

else

begin

if strlen(pChar(sec_num))>1 then 如果是小數,則繼續輸入

sec_num:=sec_num+(sender as TSpeedButton).Caption

else

sec_num:=(sender as TSpeedButton).Caption;

如果不是小數,則去掉最高位的0

end;

end

else

sec_num:=sec_num+(sender as TSpeedButton).Caption;

StaticText1.Caption:=sec_num;

end;

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

StaticText1.Caption:='0.'; 設定StaticText1初始顯示為0.

restart:=False;

Isfirst:=True;

fir_num:='';

sec_num:='';

end;

procedure TForm1.SpeedButton11Click(Sender: TObject);

begin

if (fir_num<>'') and (sec_num<>'') then

如果兩各運算元都不為空

begin

result:=count(sign); 呼叫函式,返回計算結果

fir_num:=floattostr(result);

sec_num:='';

StaticText1.Caption:=floattostr(result);

end;

sign:=(sender as TSpeedButton).Tag;

isfirst:=False;

restart:=False;

end;

procedure TForm1.SpeedButton15Click(Sender: TObject);

begin

if (sec_num<>'') then

如果第二個運算元不為空則返回結果

begin

result:=count(sign);

fir_num:='';

fir_num:=fir_num+floattostr(result);

StaticText1.Caption:=floattostr(result);

sec_num:='';

end;

restart:=true;

end;

procedure TForm1.SpeedButton16Click(Sender: TObject);

begin

restart:=True;

fir_num:='';

sec_num:='';

self.StaticText1.Caption:='0.';

end;

procedure TForm1.SpeedButton17Click(Sender: TObject);

begin

Close;

end;

end.

哪位能告訴我這種計算器怎麽計算∑和產生隨機數

您的計算器無法進行西格瑪求和運算 隨機數請按[SHIFT] [.](小數點)和等於號

  • 上一篇:求高考作文人物素材
  • 下一篇:可愛的娃娃光頭料。
  • copyright 2024編程學習大全網