advanced help
per page, with , order by , clip by
Results of 1 - 1 of about 14729 for VBA�������������� (0.003 sec.)
[[20210402174537]]
#score: 3408
@digest: beeeaf7b762f4711d63a9a93ecc5d834
@id: 87221
@mdate: 2021-04-02T09:45:20Z
@size: 1854
@type: text/plain
#keywords: selfile (27250), confile (22494), sysdata (15241), saebonpa (15241), 込時 (9974), 込") (4464), 列化 (4023), xloverwritecells (3931), 取込 (3867), ル(. (3740), 込() (3231), querytable (2801), 列h (2714), textfileparsetype (2678), textfileplatform (2532), 列形 (2480), textfilecommadelimiter (2278), 号等 (2136), refreshstyle (2127), 『0 (1855), vbboolean (1725), tipsfound (1652), querytables (1606), xldelimited (1412), refresh (1383), vartype (1352), コマ (1221), connection (1160), 略さ (1043), マン (1031), 省略 (882), getopenfilename (732)
VBAでtxtデータ取込時『0』から始まる11桁数字を省略せずに表記したい』(saebonpa)
VBAが全く分からない初心者です。 いろいろ調べた結果、以下のコマンドをVBAで登録することで、CSV形式のTXTファイルをExcelファイルに取り込むことができるようにはなったのですが、『0』から始まる11桁の登録番号等が、先頭の『0』が省略され10桁になったり、『1.28699E+11』このような形に省略されてしまったりして、再度Systemに書き込むときに問題が発生して困っております。 つきましては、『0』から始まる11桁の数値を文字列形式で取り込むVBAコマンドを教えていただきたく、またどの位置にそのコマンドを入れたら良いのかをご教示いただきたく投稿させていただきました。 <現在のVBA> Sub a_SysData取込() Dim Ws As Worksheet Dim Qt As QueryTable Dim SelFile As Variant Dim ConFile As String SelFile = Application.GetOpenFilename("Textファイル(.txt),.txt") If VarType(SelFile) = vbBoolean Then Exit Sub End If ConFile = "TEXT;" & SelFile Sheets("SysData取込").Activate Set Ws = ActiveSheet Set Qt = Ws.QueryTables.Add(Connection:=ConFile, Destination:=Ws.Range("A4")) With Qt .TextFilePlatform = 932 .TextFileParseType = xlDelimited .TextFileCommaDelimiter = True .RefreshStyle = xlOverwriteCells .Refresh .Delete End With End Sub 具体的には上記に、『列Hのデータを文字列化して取込時にすべてを表示させる』というコマンドを入れ込みたいと考えております。 (実際には列H〜列Lまでを文字列化してすべてを表示させたいのですが。。。) ご教示のほどよろしくお願いいたします。 < 使用 Excel:Excel2016、使用 OS:Windows10 > ---- <ご参考> https://www.tipsfound.com/vba/18014 (きまぐれ) 2021/04/02(金) 18:21 ---- (きまぐれ)様 ありがとうございました。 ゆっくり読んで、何とか設定ができました。 本当に助かりました。 (saebonpa) 2021/04/02(金) 18:45 ...
https://www.excel.studio-kazu.jp/wiki/kazuwiki/202104/20210402174537.txt - [detail] - similar
PREV NEXT
Powered by Hyper Estraier 1.4.13, with 97038 documents and 608190 words.

訪問者:カウンタValid HTML 4.01 Transitional